mysql 的 sqoop 导入问题 [英] sqoop import issue with mysql
本文介绍了mysql 的 sqoop 导入问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个基于 cdh5 的 hadoop ha 设置.我尝试使用 sqoop 从 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.
我使用了以下命令..
sqoop import --connect jdbc:mysql://<mysql hostname>:3306/haddata --username root --password password --table authors --hive-import
我的mysql服务器版本是5.1.73-3.并使用了 5.1.34 和 5.1.17 版本的 mysql-connector-java
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.
推荐答案
尝试在导入命令中包含选项 --driver com.mysql.jdbc.Driver.
Try including the option --driver com.mysql.jdbc.Driver in the import command.
这篇关于mysql 的 sqoop 导入问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文