我使用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 | |
+-----------+---------+------+-----+---------+-------+
你能幫我解決這個問題?謝謝!
的正常工作在更改MySQL連接器的版本後,錯誤消失。謝謝! – Anuo
@Anuo ^^^^^^^^^^^^^^ –