$ sqoop import --connect jdbc:mysql://localhost:3306/mydb --username root --P --table students -m 1 --delete-target-dir
Warning: /usr/local/sqoop/../hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: /usr/local/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
Warning: /usr/local/sqoop/../zookeeper does not exist! Accumulo imports will fail.
Please set $ZOOKEEPER_HOME to the root of your Zookeeper installation.
2020-07-16 19:00:37,703 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7
Enter password:
2020-07-16 19:00:39,154 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
2020-07-16 19:00:39,160 INFO tool.CodeGenTool: Beginning code generation
2020-07-16 19:00:39,885 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `students` AS t LIMIT 1
2020-07-16 19:00:39,963 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `students` AS t LIMIT 1
2020-07-16 19:00:39,972 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is /usr/local/hadoop
注: /tmp/sqoop-hadoop/compile/b06c6acad69cdd89c91ddf66368c2df7/students.java使用或覆盖了已过时的 API。
注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
2020-07-16 19:00:42,793 INFO orm.CompilationManager: Writing jar file: /tmp/sqoop-hadoop/compile/b06c6acad69cdd89c91ddf66368c2df7/students.jar
2020-07-16 19:00:44,457 INFO tool.ImportTool: Destination directory students deleted.