尝试使用不支持这些操作的事务管理器进行更新或删除 [英] Attempt to do update or delete using transaction manager that does not support these operations

查看:2586
本文介绍了尝试使用不支持这些操作的事务管理器进行更新或删除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试更新Cloudera Quickstart VM中的Hive表中的数据时,出现此错误。
$ b


编译语句时出错:FAILED:SemanticException [错误10294]:尝试使用事务管理器进行更新或删除支持这些操作。


我在hive-site.xml文件中添加了一些更改,并重新启动了配置单元和cloudera。这些都是我在Hive-site.xml中做出的改变。

  hive.support.concurrency  -  true 
hive.enforce .bucketing - true
hive.exec.dynamic.partition.mode - 非限制
hive.txn.manager -org.apache.hadoop.hive.ql.lockmgr.DbTxnManager
hive.compactor。 initiator.on - true
hive.compactor.worker.threads - 1


解决方案

我试过用你在hortonworks沙箱中提供的配置,我可以在一个表上做ACID操作,我想它也可以在Cloudera环境中使用。虽然有一些要注意的事情:


  • 确保配置单元具有您给它的属性(您可以使用SET命令在Hive CLI中验证它们)你使用的表必须是bucketed的,声明为ORC格式,并且在表中有属性'transactional'='true'(配置单元仅支持ORC格式的ACID操作和事务表)。一个适当的表的例子是这样的:
    $ b $ p $ hive> create table testTableNew(id int,name string)由(id)聚类到2存储为orc TBLPROPERTIES('transactional'='true');




您可以按照此 example


While trying to update a data in Hive table in Cloudera Quickstart VM, I'm getting this error.

Error while compiling statement: FAILED: SemanticException [Error 10294]: Attempt to do update or delete using transaction manager that does not support these operations.

I added some changes in hive-site.xml file and also restarted the hive and cloudera.These are changes which I made in Hive-site.xml

hive.support.concurrency – true
hive.enforce.bucketing – true
hive.exec.dynamic.partition.mode – nonstrict
hive.txn.manager –org.apache.hadoop.hive.ql.lockmgr.DbTxnManager
hive.compactor.initiator.on – true
hive.compactor.worker.threads – 1

解决方案

I've tried with the configuration you provided in a hortonworks sandbox and I was able to do ACID operations on a table and I suppose it works also in Cloudera environment. Although there a some things to mention:

  • make sure hive has the properties you gave it (you can verify them in Hive CLI using SET command)
  • table that you work with must be bucketed, declared as ORC format and has in it's table properties 'transactional'='true' (hive support ACID operations only for ORC format and transactional tables). An example of a proper table is like this:

    hive>create table testTableNew(id int ,name string ) clustered by (id) into 2 buckets stored as orc TBLPROPERTIES('transactional'='true');

You can follow this example.

这篇关于尝试使用不支持这些操作的事务管理器进行更新或删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆