Sqoop Import Failing due to error 28 from storage engine


#1

Hello,

Below error is thrown when I am running a sqoop import command. Details below.
Command:
sqoop import --connect “jdbc:mysql://cxln2.c.thelab-240901.internal/retail_db” --password NHkkP876rp --username sqoopuser --table products --target-dir /user/charantheking16954/practice1/problem5 --as-parquetfile --split-by “product_id”

Error Logs:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/2.6.2.0-205/hadoop/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/2.6.2.0-205/accumulo/lib/slf4j-log4j12.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
19/08/12 15:04:37 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6.2.6.2.0-205
19/08/12 15:04:37 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
19/08/12 15:04:37 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
19/08/12 15:04:37 INFO tool.CodeGenTool: Beginning code generation
19/08/12 15:04:37 INFO tool.CodeGenTool: Will generate java class as codegen_products
19/08/12 15:04:38 INFO manager.SqlManager: Executing SQL statement: SELECT t. FROM products AS t LIMIT 1*
19/08/12 15:04:38 ERROR manager.CatalogQueryManager: Failed to list columns from query: SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = (SELECT SCHEMA()) AND TABLE_NAME = 'products’
java.sql.SQLException: Got error 28 from storage engine
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1078)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4187)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4119)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2570)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2731)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2814)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2763)
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1614)
at org.apache.sqoop.manager.CatalogQueryManager.getColumnNames(CatalogQueryManager.java:150)
at org.apache.sqoop.orm.ClassWriter.getColumnNames(ClassWriter.java:1808)
at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1662)
at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:107)
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:488)
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:615)
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)
19/08/12 15:04:38 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.RuntimeException: java.sql.SQLException: Got error 28 from storage engine
java.lang.RuntimeException: java.sql.SQLException: Got error 28 from storage engine
at org.apache.sqoop.manager.CatalogQueryManager.getColumnNames(CatalogQueryManager.java:165)
at org.apache.sqoop.orm.ClassWriter.getColumnNames(ClassWriter.java:1808)
at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1662)
at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:107)
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:488)
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:615)
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)
Caused by: java.sql.SQLException: Got error 28 from storage engine
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1078)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4187)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4119)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2570)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2731)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2814)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2763)
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1614)
at org.apache.sqoop.manager.CatalogQueryManager.getColumnNames(CatalogQueryManager.java:150)
… 11 more

Can you please advise on this ?

Thanks,
Sai


#2

Hello,

Looks like the issue is resolved as the same command seems to be working now. Might be a lab issue.

Thanks,
Sai