In this post I will try to make collection of common errors which we face in Sqoop.
Error 1 : if you are facing any issue like com.mysql.jdbc.RowDataDynamic@692b53b4
Full Trace :
ERROR manager.SqlManager: Error reading from database: java.sql.SQLException: Streaming result set com.mysql.jdbc.RowDataDynamic@692b53b4 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.
Solution :
Add below line in your import sqoop query
--driver com.mysql.jdbc.Driver \
Like :
sqoop import \
--connect jdbc:mysql://localhost/userdb \
--username hiveuser \
--password hiveuser \
--driver com.mysql.jdbc.Driver \
--table emp --m 1
Error 2: Import fails due to ClassNotFoundException
Full Trace :
04/12/14 11:25:18 INFO mapred.LocalJobRunner: map task executor complete.
04/12/14 11:25:18 WARN mapred.LocalJobRunner: job_local194018022_0001.
java.lang.Exception: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class emp not found
Solution :
Add line in your import command
--bindir /usr/local/sqoop \
Like :
sqoop import \
--connect jdbc:mysql://localhost/userdb \
--username hiveuser \
--password hiveuser \
--driver com.mysql.jdbc.Driver \
--bindir /usr/local/sqoop \
--table emp --m 1
No comments:
Post a Comment