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

Switch to Threaded View
Sqoop >> mail # user >> Sqoop hangs when import from Teradata


Copy link to this message
-
Re: Sqoop hangs when import from Teradata
It turns out that I have to provide "--split-by actionId". It took 53mins
to print out the exception in my system.

14/06/18 12:04:33 INFO teradata.TeradataManagerFactory: Loaded connector
factory for 'Cloudera Connector Powered by Teradata' on version 1.2c5
14/06/18 12:04:33 INFO manager.SqlManager: Using default fetchSize of 1000
14/06/18 12:04:33 INFO options.ExtraOptions: Parsing extra arguments
14/06/18 12:04:33 INFO options.ExtraOptions: Loaded extra option for batch
size 1000
14/06/18 12:04:33 INFO options.OptionsCompatibility: Checking options
compatibility
14/06/18 12:04:35 INFO tool.CodeGenTool: Beginning code generation
14/06/18 12:04:35 INFO teradata.TeradataManager: Converting table import to
query: SELECT * FROM "action"
14/06/18 12:04:36 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is
/opt/cloudera/parcels/CDH/lib/hadoop-mapreduce
Note: /tmp/sqoop-bwang/compile/405654670de634debca58668abd0d1f4/action.java
uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
14/06/18 12:04:40 INFO orm.CompilationManager: Writing jar file:
/tmp/sqoop-bwang/compile/405654670de634debca58668abd0d1f4/action.jar
14/06/18 12:04:40 INFO teradata.TeradataManager: Beginning Teradata table
based import
14/06/18 12:57:25 ERROR sqoop.Sqoop: Got exception running Sqoop:
java.lang.RuntimeException: Table action does not have primary key. Please
use --split-by argument if applicable
java.lang.RuntimeException: Table action does not have primary key. Please
use --split-by argument if applicable
        at
com.cloudera.connector.teradata.TeradataManager.getPrimaryKey(TeradataManager.java:175)
        at
org.apache.sqoop.manager.SqlManager.getSplitColumn(SqlManager.java:546)
        at
com.cloudera.connector.teradata.TeradataManager.importTable(TeradataManager.java:273)
        at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:413)
        at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:506)
        at org.apache.sqoop.Sqoop.run(Sqoop.java:147)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
        at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183)
        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:222)
        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:231)
        at org.apache.sqoop.Sqoop.main(Sqoop.java:240)

On Tue, Jun 17, 2014 at 6:09 PM, Benyi Wang <[EMAIL PROTECTED]> wrote: