将表从mysql导入hdfs

dm7nw8vv  于 2021-05-31  发布在  Hadoop
关注(0)|答案(0)|浏览(263)

我正在使用sqoop作业将mysql表导入hdfs。首先我创建一个作业 sqoop job --create mySqoopJob3 -- import --connect jdbc:mysql://localhost/sqoop_test --table sqoopJob 然后使用命令执行保存的sqoop作业 sqoop job --exec mySqoopJob3 -- --username root 执行上述命令后,抛出异常,如下所述:

SLF4J: Found binding in [jar:file:/usr/hdp/2.4.0.0-169/hadoop/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/2.4.0.0-169/zookeeper/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
20/08/03 11:42:11 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
20/08/03 11:42:11 INFO tool.CodeGenTool: Beginning code generation
20/08/03 11:42:12 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `sqoopJob` AS t LIMIT 1
20/08/03 11:42:12 ERROR manager.SqlManager: Error reading from database: java.sql.SQLException: Streaming result set com.mysql.jdbc.RowDataDynamic@52de94b8 is still active. No statements may be issued when any streaming result sets are open and in use on a given connection. Ensure that you have called .close() on any active streaming result sets before attempting more queries.
java.sql.SQLException: Streaming result set com.mysql.jdbc.RowDataDynamic@52de94b8 is still active. No statements may be issued when any streaming result sets are open and in use on a given connection. Ensure that you have called .close() on any active streaming result sets before attempting more queries.

我也从你那里得到帮助https://sqoop.apache.org/docs/1.4.6/sqoopuserguide.html#_purpose_6 但没有找到任何链接。有人能帮我吗。我做错了什么。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题