与mysql的sqoop导入问题 [英] sqoop import issue with mysql

查看:250
本文介绍了与mysql的sqoop导入问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  15/03/20 12:47:53错误manager.SqlManager:从数据库读取时出错:java.sql.SQLException:流结果集com.mysql.jdbc.RowDataDynamic@33573e93仍处于活动状态。当任何流式结果集打开并在给定连接上使用时,不会发布任何语句。确保您在尝试更多查询之前在任何活动流式结果集上调用了.close()。 
java.sql.SQLException:流结果集com.mysql.jdbc.RowDataDynamic@33573e93仍处于活动状态。当任何流式结果集打开并在给定连接上使用时,不会发布任何语句。确保您在尝试更多查询之前在任何活动流式结果集上调用了.close()。

我已经使用了下面的命令..

  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

  sqoop版本为1.4.5-cdh5.3.2 

请让我知道任何建议/评论。

解决方案

尝试在导入命令中包含选项--driver com.mysql.jdbc.Driver。


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.

解决方案

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

这篇关于与mysql的sqoop导入问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆