hive會話中設置如下
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;
事務表只支持分桶orc表
CREATE TABLE hive_acid_demo (key int, value int)
CLUSTERED BY(key) INTO 3 BUCKETS
STORED AS ORC
TBLPROPERTIES ('transactional'='true');
接下來就可以進行更新 / 刪除了
http://dwgeek.com/apache-hive-table-update-using-acid-transactions-and-examples.html/