hive分桶事務表Demo

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/

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章