Problem:
sqoop export --connect
"jdbc:mysql://sandbox.hortonworks.com:3306/hdpcdpractise" --username
hadoop --password hadoop --table weather --export-dir
/user/hortonworks/weather/
--fields-terminated-by ',';
Some times when we run sqoop commands like above we will
get following error
“ERROR manager.SqlManager: Error reading from
database: java.sql.SQLException: Streaming result set
com.mysql.jdbc.RowDataDynamic@3c2d5cfb 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@3c2d5cfb is still active. No statements may be
issued when any streaming result sets are open and in use on a given
connection.”
Solution:
Simple solution would be adding driver parameter with
value like below
--driver com.mysql.jdbc.Driver
sqoop export --connect
"jdbc:mysql://sandbox.hortonworks.com:3306/hdpcdpractise" --username
hadoop --password hadoop --table weather --export-dir
/user/hortonworks/weather/
--fields-terminated-by ',' --driver com.mysql.jdbc.Driver
0 comments:
Post a Comment