Hive> CREATE TABLE dummy(value STRING);
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:javax.jdo.JDODataStoreException: An exception was thrown while adding/validating class(es) : Specified key was too long; max key length is 767 bytes
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes
参考网络上的文章:
h2内存数据库-hive的Specified key was too long; max key length is 767 bytes问题解决
解决方法:
mysql > alter database hive character set latin1;
再在Hive里创建表已经ok了
本文详细介绍了在使用Hive进行数据分析时遇到的Specifiedkeywastoolong;maxkeylengthis767bytes错误的解决方案,通过修改数据库字符集为latin1,成功解决了问题。
2万+

被折叠的 条评论
为什么被折叠?



