Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Sqoop >> mail # user >> sqoop incremental import fails- Violation of unique constraint SQOOP_SESSIONS_UNQ


Copy link to this message
-
sqoop incremental import fails- Violation of unique constraint SQOOP_SESSIONS_UNQ
Hi Sqoop users,
Does anyone know whats the fix for this?

I'm trying to  have incremental database changes imported into the
metastore that hive uses.

3/09/25 16:50:00 INFO hive.HiveImport: Time taken: 2.053 seconds
13/09/25 16:50:00 INFO hive.HiveImport: Hive import complete.
13/09/25 16:50:00 INFO hive.HiveImport: Export directory is empty, removing
it.
13/09/25 16:50:00 INFO tool.ImportTool: Saving incremental import state to
the metastore
13/09/25 16:50:00 ERROR tool.ImportTool: Encountered IOException running
import job: java.io.IOException: Error communicating with database
        at org.apache.sqoop.metastore.hsqldb.HsqldbJobStorage.
createInternal(HsqldbJobStorage.java:426)
        at org.apache.sqoop.metastore.hsqldb.HsqldbJobStorage.
update(HsqldbJobStorage.java:445)
        at org.apache.sqoop.tool.ImportTool.saveIncrementalState(
ImportTool.java:130)
        at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:418)
        at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:476)
        at org.apache.sqoop.tool.JobTool.execJob(JobTool.java:228)
        at org.apache.sqoop.tool.JobTool.run(JobTool.java:283)
        at org.apache.sqoop.Sqoop.run(Sqoop.java:145)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
        at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:181)
        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:220)
        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:229)
        at org.apache.sqoop.Sqoop.main(Sqoop.java:238)
Caused by: java.sql.SQLException: Violation of unique constraint
SQOOP_SESSIONS_UNQ: duplicate value(s) for column(s)
JOB_NAME,PROPNAME,PROPCLASS in statement [INSERT INTO SQOOP_SESSIONS
(propval, job_name, propclass, propname) VALUES (?, ?, ?, ?)]
        at org.hsqldb.jdbc.Util.throwError(Unknown Source)
        at org.hsqldb.jdbc.jdbcPreparedStatement.executeUpdate(Unknown
Source)
        at org.apache.sqoop.metastore.hsqldb.HsqldbJobStorage.setV0Property(
HsqldbJobStorage.java:707)
        at org.apache.sqoop.metastore.hsqldb.HsqldbJobStorage.
createInternal(HsqldbJobStorage.java:415)
        ... 12 more

-------------------
+
Jarek Jarcec Cecho 2013-09-30, 17:42
+
Suhas Satish 2013-10-10, 20:15