Sqoop eval error: GC overhead limit exceeded


#1

Hi team,

I am trying to run the below query in sqoop but it throws error:-

sqoop eval \

–connect jdbc:mysql://ms.itversity.com:3306/h1b_db
–username h1b_user
–password itversity
–query “select * from h1b_data”

Below are the logs:-
18/10/11 13:51:08 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6.2.6.5.0-292
18/10/11 13:51:08 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
18/10/11 13:51:09 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
Exception in thread “main” java.lang.OutOfMemoryError: GC overhead limit exceeded
at com.mysql.jdbc.MysqlIO.nextRowFast(MysqlIO.java:2222)
at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1999)
at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:3504)
at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:490)
at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:3198)
at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2366)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2789)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2820)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2159)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1383)
at org.apache.sqoop.tool.EvalSqlTool.run(EvalSqlTool.java:68)
at org.apache.sqoop.Sqoop.run(Sqoop.java:147)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:225)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234)
at org.apache.sqoop.Sqoop.main(Sqoop.java:243)

Kindly help!

Thanks,
Moumita


#2

Use limit in your query.

sqoop eval \
--connect jdbc:mysql://ms.itversity.com:3306/h1b_db \
--username h1b_user \
--password itversity \
--query "select * from h1b_data limit 10"