Hive不支持update、delete解决方案

Hive ACID

要实现update和delete功能,该表就必须支持ACID,而支持ACID,就必须满足以下条件:

  • 表的存储格式必须是ORC(STORED AS ORC);

  • 表必须进行分桶(CLUSTERED BY (col_name, col_name, …) INTO num_buckets BUCKETS);

  • Table property中参数transactional必须设定为True(tblproperties(‘transactional’=‘true’));

Hive使用update和delete中有两种常见报错

报错一:Attempt to do update or delete using transaction manager that does not support these operations.

报错二:Attempt to do update or delete on table liuli.cars that does not use an AcidOutputFormat or is not bucketed

 报错一解决方案:配置hive-site.xml

服务端
hive-site.xml 的 Hive 服务高级配置代码段(安全阀)

  • hive.compactor.initiator.on – true

  • hive.compactor.worker.threads – 1</

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值