1
votes

I am using Hadoop-2.6.0 secured with kerberos. Installed hive server2 1.1.0 version with derby database as connectionurl, enabled security and enabled Authorization. When enabling transaction configuration, I am getting the below exception and cannot execute any queries;

Exception

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

Logs

[Error 10280]: Error communicating with the metastore org.apache.hadoop.hive.ql.lockmgr.LockException: Error communicating with the metastore at org.apache.hadoop.hive.ql.lockmgr.DbTxnManager.getValidTxns(DbTxnManager.java:300) at org.apache.hadoop.hive.ql.Driver.recordValidTxns(Driver.java:927)
Caused by: MetaException(message:Unable to select from transaction database, java.sql.SQLSyntaxErrorException: Table/View 'TXNS' does not exist.

So i have created a below property in hive-site.xml file as mentioned in a blog here

Configuration

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

If i set the above property then getting the below exception where i am struck and unable to solve it. I cannot run any query even use mydb;

Exception

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

Logs

Error executing statement: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: NullPointerException null at org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:315) at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:103)
Caused by: java.lang.NullPointerException at org.apache.hadoop.hive.metastore.txn.TxnHandler.checkQFileTestHack(TxnHandler.java:1146) at org.apache.hadoop.hive.metastore.txn.TxnHandler.(TxnHandler.java:117)

I need a solution to work ACID transactions in Hive Server2. I found two related questions but not solved my issue.

hive 0.14 update and delete queries configuration error

Hive Transactions are crashing

1

1 Answers

0
votes

Upgrade your hive mysql metastore db with hive-txn-schema-0.14.0.mysql.sql as follows..

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