gpt4 book ai didi

hadoop - 尝试使用不支持这些操作的事务管理器进行更新或删除

转载 作者:可可西里 更新时间:2023-11-01 14:10:52 26 4
gpt4 key购买 nike

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

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

我在 hive-site.xml 文件中添加了一些更改,还重新启动了 hive 和 cloudera。这些是我在 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

最佳答案

我已经尝试使用您在 hortonworks 沙箱中提供的配置,我能够在表上执行 ACID 操作,我想它也适用于 Cloudera 环境。虽然有一些事情要提:

  • 确保 Hive 具有您提供的属性(您可以使用 SET 命令在 Hive CLI 中验证它们)
  • 您使用的表必须是分桶的,声明为 ORC 格式并且在其表属性中具有“transactional”=“true”(hive 仅支持 ORC 格式和事务表的 ACID 操作)。一个合适的表格的例子是这样的:

    hive>创建表 testTableNew(id int ,name string ) 按 (id) 聚集到 2 个存储为 orc TBLPROPERTIES('transactional'='true'); 的桶中

    <

可以关注这个example .

关于hadoop - 尝试使用不支持这些操作的事务管理器进行更新或删除,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34198339/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com