CDH5.4.10 在Hive上执行Update,Delete操作报错Attempt to do update or delete using transaction manager that doe
2016-08-24 16:35
811 查看
在Hive上执行事务操作(增、删、改、查)出现FAILED: SemanticException [Error 10294]: Attempt to do update or delete using transaction manager that does not support these operations.错误
已被周知的是Hive从0.14版开始支持事务操作,而CDH5.4.10总的Hive是1.1.0版本,而且该配置的也都配置了,如
SET hive.support.concurrency=true;
SET hive.enforce.bucketing=true;
SET hive.exec.dynamic.partition.mode=nonstrict;
SET hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
SET hive.compactor.initiator.on=true;
SET hive.compactor.worker.threads=1;
set hive.compactor.worker.threads = 1 ; update abc1 SET empwork_name = "Raj" where empwork_key = 70;"
还有把表建成orc格式,增加bucket
create table testTableNew(id int ,name string ) clustered by (id) into 2 buckets stored as orc TBLPROPERTIES('transactional'='true');
但问题依旧没有解决
后来搜了下Cloudera的官方论坛,有个方案是在hive运行时配置事务操作,例如
hive -e "set hive.auto.convert.join.noconditionaltask.size = 10000000; set hive.support.concurrency = true; set hive.enforce.bucketing = true; set hive.exec.dynamic.partition.mode = nonstrict; set hive.txn.manager = org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
set hive.compactor.initiator.on = true;
解决问题,原因是Hive事务管理器( transaction manager )不支持设置为每条Query级别的,而是应该是Session级别的
已被周知的是Hive从0.14版开始支持事务操作,而CDH5.4.10总的Hive是1.1.0版本,而且该配置的也都配置了,如
SET hive.support.concurrency=true;
SET hive.enforce.bucketing=true;
SET hive.exec.dynamic.partition.mode=nonstrict;
SET hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
SET hive.compactor.initiator.on=true;
SET hive.compactor.worker.threads=1;
set hive.compactor.worker.threads = 1 ; update abc1 SET empwork_name = "Raj" where empwork_key = 70;"
还有把表建成orc格式,增加bucket
create table testTableNew(id int ,name string ) clustered by (id) into 2 buckets stored as orc TBLPROPERTIES('transactional'='true');
但问题依旧没有解决
后来搜了下Cloudera的官方论坛,有个方案是在hive运行时配置事务操作,例如
hive -e "set hive.auto.convert.join.noconditionaltask.size = 10000000; set hive.support.concurrency = true; set hive.enforce.bucketing = true; set hive.exec.dynamic.partition.mode = nonstrict; set hive.txn.manager = org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
set hive.compactor.initiator.on = true;
解决问题,原因是Hive事务管理器( transaction manager )不支持设置为每条Query级别的,而是应该是Session级别的
相关文章推荐
- mybatis中update执行多次
- UpdatePanel中用后台CS代码调用JS代码,先执行控件事件,后触发JS
- cocos2d-x调用scheduleUpdate()不执行update()方法的解决办法
- Java 程序中执行update返回结果
- 使用 链接服务器执行SELECT、UPDATE、INSERT 或 DELETE 及其它命令
- hive 实现job并发执行
- hive执行计划EXPLAIN
- hive入门学习:explain执行计划的理解
- update-rc.d 开机自动执行脚本
- Android系统Recovery工作原理之使用update.zip升级过程分析(八)---升级程序update_binary的执行过程
- Android系统Recovery工作原理之使用update.zip升级过程分析(九)---updater-script脚本语法简介以及执行流程
- 在MySQL中阻止UPDATE, DELETE 语句的执行,在没有添加WHERE条件
- ubuntu 执行apt-get update 提示无法获得锁
- OleDbDataAdapter 的Update语句执行时提示“insert into语法错误”解决方法
- hive2.1.insert、update、delete操作测试
- Hibernate执行Update操作之后查询跟新的语句出错
- 执行 hive 权限问题
- ABP 执行 update-database报错 建立连接时出现与网络相关的或特定于实例的错误
- Hive任意命令/代码执行漏洞+渗透实例
- Hive 执行过程源码分析