Attempted to generate class with no column

14/12/23 04:31:03 ERROR tool.ImportTool: Imported Failed: Attempted to generate class with no column

1、导致该问题的原因是
sqoop import --connect jdbc:oracle:thin:@192.168.1.136:1521/jist --username UAP --password uap --table YKBZ_DETAIL --hive-import
中将用户名小写,
解决办法:将小写uap改为大写UAP

Sqoop 把数据从Oracle中迁移到Hive中时发生错误:

[hadoop@Master ~]$ sqoop import --connect jdbc:oracle:thin:@192.168.6.77:1521:orcl --username micmiu -P --table T_DEMO --warehouse-dir /user/sqoop --hive-import --create-hive-table 
Warning: /usr/lib/hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
Enter password: 
14/04/11 11:30:18 INFO tool.BaseSqoopTool: Using Hive-specific delimiters for output. You can override
14/04/11 11:30:18 INFO tool.BaseSqoopTool: delimiters with --fields-terminated-by, etc.
14/04/11 11:30:18 WARN tool.BaseSqoopTool: It seems that you've specified at least one of following:
14/04/11 11:30:18 WARN tool.BaseSqoopTool: 	--hive-home
14/04/11 11:30:18 WARN tool.BaseSqoopTool: 	--hive-overwrite
14/04/11 11:30:18 WARN tool.BaseSqoopTool: 	--create-hive-table
14/04/11 11:30:18 WARN tool.BaseSqoopTool: 	--hive-table
14/04/11 11:30:18 WARN tool.BaseSqoopTool: 	--hive-partition-key
14/04/11 11:30:18 WARN tool.BaseSqoopTool: 	--hive-partition-value
14/04/11 11:30:18 WARN tool.BaseSqoopTool: 	--map-column-hive
14/04/11 11:30:18 WARN tool.BaseSqoopTool: Without specifying parameter --hive-import. Please note that
14/04/11 11:30:18 WARN tool.BaseSqoopTool: those arguments will not be used in this session. Either
14/04/11 11:30:18 WARN tool.BaseSqoopTool: specify --hive-import to apply them correctly or remove them
14/04/11 11:30:18 WARN tool.BaseSqoopTool: from command line to remove this warning.
14/04/11 11:30:18 INFO tool.BaseSqoopTool: Please note that --hive-home, --hive-partition-key, 
14/04/11 11:30:18 INFO tool.BaseSqoopTool: 	 hive-partition-value and --map-column-hive options are 
14/04/11 11:30:18 INFO tool.BaseSqoopTool: 	 are also valid for HCatalog imports and exports
14/04/11 11:30:18 INFO manager.SqlManager: Using default fetchSize of 1000
14/04/11 11:30:18 INFO tool.CodeGenTool: Beginning code generation
14/04/11 11:30:19 INFO manager.OracleManager: Time zone has been set to GMT
14/04/11 11:30:19 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM T_DEMO t WHERE 1=0
14/04/11 11:30:19 ERROR tool.ImportTool: Imported Failed: Attempted to generate class with no columns!

这个原因是因为:-username micmiu 用户名这个参数, 需要把用户名大写:-username MICMIU ,再执行就ok了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值