尝试使用不支持这些操作的事务管理器进行更新或删除 [英] Attempt to do update or delete using transaction manager that does not support these operations
问题描述
在尝试更新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环境中使用。虽然有一些要注意的事情:
$ 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屋!