hive中Specified key was too long; max key length is 767 bytes问题解决

18 篇文章 1 订阅
当hive安装完成后,在hive中执行show table等任何命令,都会报以下错:

[grid@racdb ~]$ hive
Logging initialized using configuration in jar:file:/home/grid/hive-0.8.1/lib/hive-common-0.8.1.jar!/hive-log4j.properties
Hive history file=/tmp/grid/hive_job_log_grid_201510181909_1589231771.txt
hive> show tables;
   FAILED: Error in metadata: javax.jdo.JDODataStoreException: Error(s) were found while auto-creating/validating the datastore for classes. The errors are printed in the log, and are attached to this exception.
NestedThrowables:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
(略去 很多java 提示)


解决办法:
是到mysql中的hive数据库里执行 alter database hive character set latin1;
改变hive元数据库的字符集,问题就可以解决!


参考:http://sunjia-704471770-qq-com.iteye.com/blog/1631430
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值