使用命令行:sqoop import --connect jdbc:mysql://*.*.*.*:3306/test?characterEncoding=UTF-8 --username aaa--password 'bbb' -table lll
尝试将mysql的数据导入到hdfs中,结果一直导入失败,并显示:
Warning: /usr/local/sqoop/sqoop/../hbase does not exist! HBase imports will fail.
Please set $HBASE_HOME to the root of your HBase installation.
Warning: /usr/local/sqoop/sqoop/../hcatalog does not exist! HCatalog jobs will fa il.
Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: /usr/local/sqoop/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
Warning: /usr/local/sqoop/sqoop/../zookeeper does not exist! Accumulo imports wil l fail.
Please set $ZOOKEEPER_HOME to the root of your Zookeeper installation.
2019-06-11 02:41:42,287 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7
2019-06-11 02:41:42,500 WARN tool.BaseSqoopTool: Setting your password on the com mand-line is insecure. Consider using -P instead.
2019-06-11 02:41:42,753 INFO manager.MySQLManager: Preparing to use a MySQL strea ming resultset.
2019-06-11 02:41:42,753 INFO tool.CodeGenTool: Beginning code generation
Tue Jun 11 02:41:43 EDT 2019 WARN: Establishing SSL connection without server's i dentity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit opt ion isn't set. For compliance with existing applications not using SSL the verify ServerCertificate property is set to 'false'. You need either to explicitly disab le SSL by setting useSSL=false, or set useSSL=true and provide truststore for ser ver certificate verification.
2019-06-11 02:41:45,892 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `data_weilai_pressure` AS t LIMIT 1
2019-06-11 02:41:47,326 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `data_weilai_pressure` AS t LIMIT 1
2019-06-11 02:41:48,010 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is /usr/l ocal/hadoop
Note: /tmp/sqoop-myy/compile/abd370f29650c545e0e82607b93e8cf0/data_weilai_pressur e.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2019-06-11 02:41:51,300 INFO orm.CompilationManager: Writing jar file: /tmp/sqoop -myy/compile/abd370f29650c545e0e82607b93e8cf0/data_weilai_pressure.jar
2019-06-11 02:41:51,434 WARN manager.MySQLManager: It looks like you are importin g from mysql.
2019-06-11 02:41:51,440 WARN manager.MySQLManager: This transfer can be faster! U se the --direct
2019-06-11 02:41:51,440 WARN manager.MySQLManager: option to exercise a MySQL-spe cific fast path.
2019-06-11 02:41:51,440 INFO manager.MySQLManager: Setting zero DATETIME behavior to convertToNull (mysql)
2019-06-11 02:41:52,127 INFO mapreduce.ImportJobBase: Beginning import of data_we ilai_pressure
2019-06-11 02:41:52,129 INFO Configuration.deprecation: mapred.job.t