问题(3)

错误信息:

    

因为要实现多人开发Hive,所以需要将hive的元数据存储在mysql。配置完成后,配置之前hive中创建的数据表在show tables时都不会出现,但hdfs数据文件都还在。当在hive中drop table 时如果报以下错时:

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


解决方案:

    解决的方法是到mysql中的hive数据库里执行:alter database hive character set latin1;改变hive元数据库的字符集.

    


                                                                                                                        Name:Xr

                                                                                                                        Date:2014-05-31 23:15

你可能感兴趣的:(问题(3))