我正在尝试创建一个允许更新的表。我看过几个关于如何配置它的文档。我们使用的是HDP 2.2.4.5和Hive 0.14。
这是我设置的配置。我在命令客户端运行这些程序。
hive> set hive.support.concurrency;
hive.support.concurrency=true
hive> set hive.enforce.bucketing;
hive.enforce.bucketing=true
hive> set hive.exec.dynamic.partition.mode;
hive.exec.dynamic.partition.mode=nonstrict
hive> set hive.txn.manager;
hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager
hive> set hive.compactor.initiator.on;
hive.compactor.initiator.on=true
hive> set hive.compactor.worker.threads;
hive.compactor.worker.threads=1下面是我的表的create语句:
CREATE TABLE bt_xda_zgrp_sch_stg_update_3(
`xda_zgrp_id` int,
`day_of_wk_ind` int,
`max_dlvry_qty` int,
`last_upd_user_id` string,
`last_upd_ts` timestamp)
clustered by (xda_zgrp_id) into 9 buckets
stored as orc TBLPROPERTIES ('transactional'='true');如果你看到任何问题或有任何建议,请告诉我。
提前谢谢你,
克雷格
发布于 2015-07-30 17:56:15
问题是,在设置db_name之前,我正在运行一个命令(如“使用Txn.manager”)。这导致txn.manager被设置为初始化,在打开新会话之前不能重置。如果我在做任何其他事情之前设置了这个属性,它就会工作。请在此找到更详细的答案:
http://hortonworks.com/community/forums/topic/help-with-hive-update/
发布于 2015-07-23 07:31:36
https://stackoverflow.com/questions/31570983
复制相似问题