0 0

sqoop 从oracle到hive 命令报错5

这是复制表结构的命令,报错如下:
[hadoop@hadoop-t04 ~]$ sqoop create-hive-table --connect jdbc:oracle:thin:@172.17.1.188:1521:lhorcl --username sq --password sq --table buyy --hive-table buyy
12/01/31 10:37:06 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
12/01/31 10:37:06 INFO tool.BaseSqoopTool: Using Hive-specific delimiters for output. You can override
12/01/31 10:37:06 INFO tool.BaseSqoopTool: delimiters with --fields-terminated-by, etc.
12/01/31 10:37:07 INFO manager.SqlManager: Using default fetchSize of 1000
12/01/31 10:37:07 INFO hive.HiveImport: Loading uploaded data into Hive
12/01/31 10:37:07 INFO manager.OracleManager: Time zone has been set to GMT
12/01/31 10:37:07 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM buyy t WHERE 1=0
12/01/31 10:37:09 INFO hive.HiveImport: Hive history file=/tmp/hadoop/hive_job_log_hadoop_201201311037_2039989600.txt
12/01/31 10:37:09 INFO hive.HiveImport: FAILED: Parse Error: line 1:36 mismatched input ')' expecting Identifier near '(' in column specification
12/01/31 10:37:09 INFO hive.HiveImport:
12/01/31 10:37:09 ERROR tool.CreateHiveTableTool: Encountered IOException running create table job: java.io.IOException: Hive exited with status 11
        at com.cloudera.sqoop.hive.HiveImport.executeExternalHiveScript(HiveImport.java:349)
        at com.cloudera.sqoop.hive.HiveImport.executeScript(HiveImport.java:299)
        at com.cloudera.sqoop.hive.HiveImport.importTable(HiveImport.java:241)
        at com.cloudera.sqoop.tool.CreateHiveTableTool.run(CreateHiveTableTool.java:60)
        at com.cloudera.sqoop.Sqoop.run(Sqoop.java:146)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
        at com.cloudera.sqoop.Sqoop.runSqoop(Sqoop.java:182)
        at com.cloudera.sqoop.Sqoop.runTool(Sqoop.java:221)
        at com.cloudera.sqoop.Sqoop.runTool(Sqoop.java:230)
        at com.cloudera.sqoop.Sqoop.main(Sqoop.java:239)

使用import命令,报错如下:
[hadoop@hadoop-t04 ~]$ sqoop import --connect jdbc:oracle:thin:@172.17.1.188:1521:lhorcl --username sq --password sq --table buyy --hive-import
12/01/31 10:34:58 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
12/01/31 10:34:58 INFO tool.BaseSqoopTool: Using Hive-specific delimiters for output. You can override
12/01/31 10:34:58 INFO tool.BaseSqoopTool: delimiters with --fields-terminated-by, etc.
12/01/31 10:34:58 INFO manager.SqlManager: Using default fetchSize of 1000
12/01/31 10:34:58 INFO tool.CodeGenTool: Beginning code generation
12/01/31 10:34:59 INFO manager.OracleManager: Time zone has been set to GMT
12/01/31 10:34:59 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM buyy t WHERE 1=0
12/01/31 10:34:59 ERROR tool.ImportTool: Imported Failed: Attempted to generate class with no columns!
希望大牛帮解决。
2012年1月31日 10:53

2个答案 按时间排序 按投票排序

0 0

这个问题我也碰到了,找了好久还是不知道怎么解决 。求分享  892253193 QQ

2012年7月19日 11:44
0 0

     你的这个问题解决了吗, 分享一下解决办法吧

2012年7月19日 00:37

相关推荐

Global site tag (gtag.js) - Google Analytics