Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sqoop import issue with mysql

I have a hadoop ha setup based on cdh5.I have tried to import tables from mysql by using sqoop failed with following error.

15/03/20 12:47:53 ERROR manager.SqlManager: Error reading from database: java.sql.SQLException: Streaming result set com.mysql.jdbc.RowDataDynamic@33573e93 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@33573e93 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 have used the below command..

sqoop import --connect jdbc:mysql://<mysql hostname>:3306/haddata --username root --password password --table authors --hive-import

My mysql server version is 5.1.73-3. and used 5.1.34 and 5.1.17 version of mysql-connector-java

sqoop version is 1.4.5-cdh5.3.2

Please let me know any suggestion/comments.

like image 406
Bobin Jose Avatar asked Mar 20 '15 08:03

Bobin Jose


1 Answers

Try including the option --driver com.mysql.jdbc.Driver in the import command.

like image 197
user5278309 Avatar answered Sep 25 '22 05:09

user5278309