hive - Hive 表更新错误尝试使用不支持这些操作的事务管理器进行更新或删除
问题描述
我的蜂巢版本。
hive --version
Hive 1.2.0-mapr-1710
Subversion git://cd4a097b705d/root/opensource/mapr-hive-1.2/dl/mapr-hive-1.2 -r cf159db974ca9f31211937874eef67b0105ef5cd
Compiled by root on Mon Oct 16 20:04:27 UTC 2017
From source with checksum 07ae5487de4e08bffbf15ebbd119411a
启用配置
set hive.support.concurrency=true;
set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
set hive.enforce.bucketing=true;
set hive.exec.dynamic.partition.mode=nostrict;
set hive.compactor.initiator.on=true;
set hive.compactor.worker.threads=1;
表创建
Create table test (
col1 varchar(10), col2 varchar(10)
)
PARTITIONED BY (col3 VARCHAR(1))
CLUSTERED BY (col2) SORTED BY (col2) INTO 2 BUCKETS
stored as orc TBLPROPERTIES('transactional'='true');
然后发出一个简单的更新查询并得到以下错误。
update test set col2='xyz' where col2='abc';
错误
FAILED: SemanticException [Error 10294]: Attempt to do update or delete using transaction manager that does not support these operations.
hive 0.14 及更高版本支持 ACID 属性。这样对吗?
我正在设置对当前会话的更改。不在xml文件中。
解决方案
是的,Hive 0.14 及更高版本支持 ACID 属性。我认为,您缺少一些配置属性。
看看答案update-on-hive-1-2-1
推荐阅读
- php - 自定义 PhpSpec 匹配器和/或扩展不起作用
- javascript - 我们可以在javascript或angular js的另一个Json文件中导入或包含一个Json文件吗
- c - 溢出缓冲区时如何防止fgets多次运行?
- javascript - 动态添加 HTML 并调用 modal
- apache-spark - Spark 结构化流恰好一次 - 未实现 - 重复事件
- c# - 线程无法使用 CancellationToken 执行清理
- node.js - 控制器之间的导出和导入功能 Adonis js
- xml - 有没有办法指定序列化列表(以 XML 文件的形式)保存到的目录
- r - R中的ggplotly:更改数据标签大小
- c++ - 绑定或列索引超出范围 SQLITE C++