参考以前的hive测试步骤一一执行。java
hive> drop table sansom;
FAILED: Error in metadata: org.apache.thrift.transport.TTransportException
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTaskmysql
若是出现
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.MySQLSyntaxErrorException: Specified key was too long; max key length is 1000 bytes
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTaskweb
或者是
FAILED: Error in metadata: MetaException(message:Got exception: org.apache.thrift.transport.TTransportException null)
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTasksql
以上错误,主要是在select操做、drop操做时,就会出错。数据库
这样的错误,能够修改hive数据库编码:apache
mysql> alter database hivedb character set latin1;
而后重启hive metastore和hive server就能够了oop
mysql数据库的编码目前最好设置为latin1,不然使用hive会出现莫名其妙的问题测试
如何仍是不行,能够使用 this
DEBUG命令:编码
hive -hiveconf hive.root.logger=DEBUG,console
来排错!