Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Sqoop >> mail # user >> Fwd: Sqoop export not working when using "update-key"


Copy link to this message
-
Re: Fwd: Sqoop export not working when using "update-key"
Well, if I try to run the command without --columns I get an error:  *Attempted
to generate class with no columns!*
Part of the log:
14/07/18 12:45:04 INFO tool.CodeGenTool: Beginning code generation
14/07/18 12:45:04 DEBUG manager.OracleManager: Using column names query:
SELECT t.* FROM SEARCH_KEYWORDS_AGGREGATION t WHERE 1=0
14/07/18 12:45:04 DEBUG manager.SqlManager: Execute getColumnTypesRawQuery
14/07/18 12:45:04 DEBUG manager.OracleManager$ConnCache: Got cached
connection for jdbc:oracle:thin:@devbox.com:1541/devdb/uDev
14/07/18 12:45:04 INFO manager.OracleManager: Time zone has been set to GMT
14/07/18 12:45:04 DEBUG manager.SqlManager: Using fetchSize for next query:
1000
14/07/18 12:45:04 INFO manager.SqlManager: Executing SQL statement: SELECT
t.* FROM SEARCH_KEYWORDS_AGGREGATION t WHERE 1=0
14/07/18 12:45:04 DEBUG manager.OracleManager$ConnCache: Caching released
connection for jdbc:oracle:thin:@devbox.com:1541/devdb/uDev
*14/07/18 12:45:04 DEBUG orm.ClassWriter: selected columns:*
14/07/18 12:45:04 DEBUG orm.ClassWriter: db write column order:
14/07/18 12:45:04 DEBUG orm.ClassWriter:   SEARCH_DATE [from --update-key
parameter]
14/07/18 12:45:04 ERROR sqoop.Sqoop: Got exception running Sqoop:
java.lang.IllegalArgumentException: Attempted to generate class with no
columns!
java.lang.IllegalArgumentException: Attempted to generate class with no
columns!
        at
org.apache.sqoop.orm.ClassWriter.generateClassForColumns(ClassWriter.java:1295)
        at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1176)
        at
org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:96)
        at org.apache.sqoop.tool.ExportTool.exportTable(ExportTool.java:64)
        at org.apache.sqoop.tool.ExportTool.run(ExportTool.java:100)
        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)

look in the log there is a "selected columns: " (empty)
On Fri, Jul 18, 2014 at 1:13 PM, Gwen Shapira <[EMAIL PROTECTED]> wrote:
 
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB