Я использую s coop экспорт из CSV-файла hdfs в таблицу mysql. Я отправляю следующую команду
sqoop export \
--connect 'jdbc:mysql://servername:3306/MYDB' \
--table MY_TABLE \
--username someuser --password somepass \
--export-dir '/some/directory/path/hadoopfile.csv' \
--input-fields-terminated-by ';' \
--verbose
Также пробовал следующие опции
--driver com.mysql.cj.jdbc.Driver \
--update-mode allowinsert \
--m 1 \
Но зависает. Вот вывод, который я вижу в базе данных сеанс, но он просто спит.
Warning: /usr/lib/sqoop/../hbase does not exist! HBase imports will fail.
Please set $HBASE_HOME to the root of your HBase installation.
Warning: /usr/lib/sqoop/../hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: /usr/lib/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
20/04/07 15:14:55 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7
20/04/07 15:14:55 DEBUG tool.BaseSqoopTool: Enabled debug logging.
20/04/07 15:14:55 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
20/04/07 15:14:56 DEBUG sqoop.ConnFactory: Loaded manager factory: org.apache.sqoop.manager.oracle.OraOopManagerFactory
20/04/07 15:14:56 DEBUG sqoop.ConnFactory: Loaded manager factory: com.cloudera.sqoop.manager.DefaultManagerFactory
20/04/07 15:14:56 DEBUG sqoop.ConnFactory: Trying ManagerFactory: org.apache.sqoop.manager.oracle.OraOopManagerFactory
20/04/07 15:14:56 DEBUG oracle.OraOopManagerFactory: Data Connector for Oracle and Hadoop can be called by Sqoop!
20/04/07 15:14:56 DEBUG sqoop.ConnFactory: Trying ManagerFactory: com.cloudera.sqoop.manager.DefaultManagerFactory
20/04/07 15:14:56 DEBUG manager.DefaultManagerFactory: Trying with scheme: jdbc:mysql:
20/04/07 15:14:56 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
20/04/07 15:14:56 DEBUG sqoop.ConnFactory: Instantiated ConnManager org.apache.sqoop.manager.MySQLManager@38c6f217
20/04/07 15:14:56 INFO tool.CodeGenTool: Beginning code generation
20/04/07 15:14:56 DEBUG manager.SqlManager: Execute getColumnInfoRawQuery : SELECT t.* FROM `MY_TABLE` AS t LIMIT 1
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
20/04/07 15:14:56 DEBUG manager.SqlManager: No connection paramenters specified. Using regular API for making connection.