ERROR manager.SqlManager: Error reading from database: java.sql.SQLException:
Streaming result set com.mysql.jdbc.RowDataDynamic@1d5a7f6 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@1d5a7f6 is still active
这个是由于mysql-connector-java-xxxx版本过低造成
如果无法改变系统环境的情况下,可以在命令行只指定新版本mysql-connector-java-xxxx.jar来执行命令
方法如下:
wget http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.32.tar.gz
下载mysql-connector-java到本地
解压tar包
tar -zxvf mysql-connector-java-5.1.32.tar.gz
把mysql-connector-java-5.1.32-bin.jar移动到sqoop脚本的执行目录通过以下命令执行脚本(注意加入红色注明的语句):
#批量导入表到hive的数据库中
sqoop import-all-tables --options-file import.txt \
--driver com.mysql.jdbc.Driver \
--direct \
--hive-import \
--hbase-create-table \
--hive-overwrite \
--hive-database test_fbd