溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

Hive問題有哪些

發(fā)布時間:2021-12-01 15:23:12 來源:億速云 閱讀:244 作者:柒染 欄目:云計算

Hive問題有哪些,很多新手對此不是很清楚,為了幫助大家解決這個難題,下面小編將為大家詳細(xì)講解,有這方面需求的人可以來學(xué)習(xí)下,希望你能有所收獲。

1 Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT…

當(dāng)啟動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的元數(shù)據(jù)存儲MySQL配置不當(dāng)引起的,可以這樣解決:

mysql> set global binlog_format='MIXED';

2 For direct MetaStore DB connections, we don’t support retries at the client level.

當(dāng)在Hive中創(chuàng)建表的時候報錯:

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;

3 HiveConf of name hive.metastore.local does not exist

當(dāng)執(zhí)行Hive客戶端時候出現(xiàn)如下錯誤:

WARN conf.HiveConf: HiveConf of name hive.metastore.local does not exist

這是由于在0.10 0.11或者之后的HIVE版本 hive.metastore.local 屬性不再使用。將該參數(shù)從hive-site.xml刪除即可。

4 Permission denied: user=anonymous, access=EXECUTE, inode=”/tmp”

在啟動Hive報如下錯誤:

(Permission denied: user=anonymous, access=EXECUTE, inode="/tmp":hadoop:supergroup:drwx------

這是由于Hive沒有hdfs:/tmp目錄的權(quán)限,賦權(quán)限即可:

hadoop dfs -chmod -R 777 /tmp

5 Specified key was too long; max key length is 767 bytes

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;

看完上述內(nèi)容是否對您有幫助呢?如果還想對相關(guān)知識有進(jìn)一步的了解或閱讀更多相關(guān)文章,請關(guān)注億速云行業(yè)資訊頻道,感謝您對億速云的支持。

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI