Importing table from mysql to HDFS

132 Views Asked by At

I am importing mysql table to HDFS using sqoop job. first i create a job

sqoop job --create mySqoopJob3 -- import --connect jdbc:mysql://localhost/sqoop_test --table sqoopJob

then i executed the saved sqoop job by using command

sqoop job --exec mySqoopJob3 -- --username root

after executing the above command it throw the exception which is as mentioned below:

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.

I also take help from https://sqoop.apache.org/docs/1.4.6/SqoopUserGuide.html#_purpose_6 this link but found nothing. Can anybody help me out. what am i doing wrong.

0

There are 0 best solutions below