2015-06-19 35 views
1

我使用的是使用kerberos進行安全保護的Hadoop-2.6.0。安裝配置單元server2 1.1.0版本與derby數據庫作爲connectionurl,啓用安全性並啓用授權。當啓用transaction configuration時,我得到下面的異常並且不能執行任何查詢;Hive Server2 ACID事務不能正常工作

異常

Error: Error while compiling statement: FAILED: LockException [Error 10280]: Error communicating with the metastore (state=42000,code=10280) 

日誌

[錯誤10280]:錯誤與metastore org.apache.hadoop.hive.ql.lockmgr.LockException通信:錯誤通信與位於org.apache.hadoop.hive.q處的org.apache.hadoop.hive.ql.lockmgr.DbTxnManager.getValidTxns(DbTxnManager.java:300) 處的Metastore l.Driver.recordValidTxns(Driver.java:927)
引起:MetaException(消息:無法從事務數據庫中選擇,java.sql.SQLSyntaxErrorException:表/視圖'TXNS'不存在。

所以我已經創造了蜂房site.xml文件一下面財產在博客here

配置

<property> 
     <name>hive.in.test</name> 
     <value>true</value> 
</property> 

提到如果我設定的上述屬性然後讓下面的例外,我感到震驚,無法解決它。我甚至無法運行任何查詢使用mydb;

異常

Error: Error while compiling statement: FAILED: NullPointerException null (state=42000,code=40000) 

日誌

錯誤執行的語句: org.apache.hive.service.cli.HiveSQLException:錯誤在編譯聲明:失敗:NullPointerException異常空 at org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:315) at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:103)
引起:java.lang.NullPointerException at org.apache.hadoop.hive.metastore.txn.TxnHandler.checkQFileTestHack( TxnHandler.java:1146) 在org.apache.hadoop.hive.metastore.txn.TxnHandler。(TxnHandler.java:117)

我需要一個解決方案在蜂房Server2上的工作ACID事務。我發現了兩個相關的問題,但沒有解決我的問題。

hive 0.14 update and delete queries configuration error

Hive Transactions are crashing

回答

0

與蜂巢-TXN-架構0.14.0.mysql.sql升級你的mysql蜂巢分貝metastore如下..

mysql> SOURCE /usr/local/hadoop/hive/scripts/metastore/upgrade/mysql/hive-txn-schema-0.14.0.mysql.sql;