2014-12-20 2 views
1

나는 Sqoop 1.4.4를 사용하여 hdfs에서 mysql으로 데이터를 익스포트한다. 그리고 다음과 같은 오류가 발생했습니다 :Sqoop export error

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

@Sachin이 말한 것처럼 다른 mysql 드라이버 버전을 사용해보십시오.

그것은 Sqoop을-1.6.1 + MySQL의 커넥터 - 자바 - 5.0.8.tar와 노동자를 doesnt't하지만 MySQL의 커넥터 - 자바-5.1.17.jar을 위해