當啓動Hive
的時候報錯:java
Caused by: javax.jdo.JDOException: Couldnt obtain a new sequence (unique id) : Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED. NestedThrowables: java.sql.SQLException: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.
這個問題是因爲hive
的元數據存儲MySQL
配置不當引發的,能夠這樣解決:node
mysql> set global binlog_format='MIXED';
當在Hive
中建立表的時候報錯:mysql
create table years (year string, event string) row format delimited fields terminated by '\t'; FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:For direct MetaStore DB connections, we don't support retries at the client level.)
這是因爲字符集的問題,須要配置MySQL
的字符集:sql
mysql> alter database hive character set latin1;
當執行Hive
客戶端時候出現以下錯誤:apache
WARN conf.HiveConf: HiveConf of name hive.metastore.local does not exist
這是因爲在0.10 0.11或者以後的HIVE版本 hive.metastore.local 屬性再也不使用。將該參數從hive-site.xml
刪除便可。oop
在啓動Hive
報以下錯誤:code
(Permission denied: user=anonymous, access=EXECUTE, inode="/tmp":hadoop:supergroup:drwx------
這是因爲Hive
沒有hdfs:/tmp
目錄的權限,賦權限便可:orm
hadoop dfs -chmod -R 777 /tmp
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
解決方法:xml
mysql > alter database hive character set latin1;