2014-12-20 167 views
1

我使用Sqoop 1.4.4將數據從hdfs導出到mysql中。 而且得到了以下錯誤:Sqoop導出錯誤

bin/sqoop export --connect jdbc:mysql://127.0.0.1:3306/rec --username root --password root --table rec_temp --export-dir hdfs://127.0.0.1:9000//user/hdfs/part-r-00000 input-lines-terminated-by ' '  

14/12/20 17:14:04 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset. 
14/12/20 17:14:04 INFO tool.CodeGenTool: Beginning code generation 
14/12/20 17:14:05 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `rec_temp` AS t LIMIT 1 
14/12/20 17:14:05 ERROR manager.SqlManager: Error reading from database: java.sql.SQLException: Streaming result set [email protected] 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 [email protected] 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. 

的更多信息:

part-r-00000 data: 
1 [105:1.1617604] 
..... 

mysql> describe rec_temp; 
+-----------+---------+------+-----+---------+-------+ 
| Field  | Type | Null | Key | Default | Extra | 
+-----------+---------+------+-----+---------+-------+ 
| user_id | int(11) | NO | PRI | NULL |  | 
| rec_value | text | YES |  | NULL |  | 
+-----------+---------+------+-----+---------+-------+ 

你能幫我解決這個問題?謝謝!

回答

2

在sqoop報告中有類似的錯誤here。請驗證您正在使用的正確的MySQL連接器版本和sqoop版本,並根據需要更新版本。希望這可以解決您的問題。謝謝。

+0

的正常工作在更改MySQL連接器的版本後,錯誤消失。謝謝! – Anuo

+0

@Anuo ^^^^^^^^^^^^^^ –

0

嘗試使用另一個mysql驅動程序版本@Sachin說。

它doesnt't與sqoop-1.6.1 + mysql的連接器的Java-5.0.8.tar工人,但是當我更改爲使用mysql-connector-java的5.1.17.jar