Hive問題有哪些,很多新手對此不是很清楚,為了幫助大家解決這個難題,下面小編將為大家詳細講解,有這方面需求的人可以來學習下,希望你能有所收獲。
當啟動Hive
的時候報錯:
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
配置不當引起的,可以這樣解決:
mysql> set global binlog_format='MIXED';
當在Hive
中創建表的時候報錯:
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
的字符集:
mysql> alter database hive character set latin1;
當執行Hive
客戶端時候出現如下錯誤:
WARN conf.HiveConf: HiveConf of name hive.metastore.local does not exist
這是由于在0.10 0.11或者之后的HIVE版本 hive.metastore.local 屬性不再使用。將該參數從hive-site.xml
刪除即可。
在啟動Hive
報如下錯誤:
(Permission denied: user=anonymous, access=EXECUTE, inode="/tmp":hadoop:supergroup:drwx------
這是由于Hive
沒有hdfs:/tmp
目錄的權限,賦權限即可:
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
解決方法:
mysql > alter database hive character set latin1;
看完上述內容是否對您有幫助呢?如果還想對相關知識有進一步的了解或閱讀更多相關文章,請關注億速云行業資訊頻道,感謝您對億速云的支持。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。