hadoop - Hive Server2 ACID 事务不起作用

标签 hadoop hive kerberos hiveql

我正在使用受 kerberos 保护的 Hadoop-2.6.0。安装了 hive server2 1.1.0 版本,使用 derby 数据库作为 connectionurl,启用了安全性并启用了授权。启用 transaction configuration 时,我收到以下异常,无法执行任何查询;

异常

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

日志

[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.

所以我在博客中提到的 hive-site.xml 文件中创建了以下属性 here

配置

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

如果我设置了上面的属性然后在我被击中并且无法解决它的地方得到下面的异常。我什至无法运行任何查询 use mydb;

异常

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

日志

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)

我需要一个解决方案来在 Hive Server2 中处理 ACID 事务。我发现了两个相关问题,但没有解决我的问题。

hive 0.14 update and delete queries configuration error

Hive Transactions are crashing

最佳答案

如下使用 hive-txn-schema-0.14.0.mysql.sql 升级您的 hive mysql metastore db..

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

关于hadoop - Hive Server2 ACID 事务不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30936640/

相关文章:

csv - 加载到 Hive 时从平面文件中删除单引号

kubernetes - 如何让 Kerberos 身份验证在 k8s 中工作

hadoop - Java - 无法指定服务器的 Kerberos 主体名称

hadoop - 我可以区分Hive中的每一列吗?

hadoop - Hive 外部表架构重新连接

python - Pyspark 从数据框中的列中删除空值

java - 使用Maven导入mahout时出错

hadoop - 更改配置单元 i​​node 目录

web-services - 如何从 Oracle PL/SQL 调用带有 Kerberos(或 NTLM)身份验证的 .NET Web 服务

hadoop - Impala 和 mem_limit