AnsweredAssumed Answered

Parallel Sqoop Imports Failing

Question asked by cpritchard on Jun 8, 2018
Latest reply on Jun 11, 2018 by cpritchard

I have a shell script that iterates through a list of tables, 460 tables in this case, and will create 10 sqoop import jobs at a time, and wait for those to finish, then create 10 more for the next 10 tables and so on until all tables have been imported. 

 

I am seeing failures on some tables, its different tables each time, tied to the sqoop metastore. The last time i ran, out of the 460 tables ,11 jobs failed 

 

See below exception from one of the jobs. They all have the same exception

 

18/06/07 21:55:16 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6-mapr-1710

18/06/07 21:55:19 ERROR tool.JobTool: I/O error performing job operation: java.io.IOException: Exception creating SQL connection

        at org.apache.sqoop.metastore.hsqldb.HsqldbJobStorage.init(HsqldbJobStorage.java:216)

        at org.apache.sqoop.metastore.hsqldb.AutoHsqldbStorage.open(AutoHsqldbStorage.java:112)

        at org.apache.sqoop.tool.JobTool.run(JobTool.java:274)

        at org.apache.sqoop.Sqoop.run(Sqoop.java:143)

        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)

        at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)

        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)

        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)

        at org.apache.sqoop.Sqoop.main(Sqoop.java:236)

Caused by: java.sql.SQLException: File input/output error: /home/network.local/s-mapr-etl-dev/.sqoop/metastore.db.script.new

        at org.hsqldb.jdbc.Util.sqlException(Unknown Source)

        at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)

        at org.hsqldb.jdbcDriver.getConnection(Unknown Source)

        at org.hsqldb.jdbcDriver.connect(Unknown Source)

        at java.sql.DriverManager.getConnection(DriverManager.java:664)

        at java.sql.DriverManager.getConnection(DriverManager.java:247)

        at org.apache.sqoop.metastore.hsqldb.HsqldbJobStorage.init(HsqldbJobStorage.java:176)

        ... 8 more

 

I have read that this may be tied to the metastore being locked by one job, and if another job tries to access it, then it will fail and that this is related to how the default configuration of the sqoop metastore works with HSQL.

 

See this article for a similar issue: Concurrent access to the Sqoop metastore - Hortonworks 

 

Has anyone else encountered this issue and have a solution/workaround?

Outcomes