參考以前的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
來排錯!