蜂巢更新问题
Hive Issue with Update
我正在尝试创建一个允许更新的 table。我看过几个关于如何配置它的文档。我们正在使用 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
这是我的 table:
的创建语句
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');
如果您发现任何问题或有任何建议,请告诉我。
提前致谢,
克雷格
根据您的 Table 创建命令,很明显您正在创建分桶 table。
“Hive 更新”无法在 Bucketed tables 上执行。
中找到 Hive 更新的限制
希望这对您有所帮助:)
问题是在设置 Txn.manager 之前我是 运行 命令(如 "use db_name")。这导致 txn.manager 被设置为初始化并且在打开新会话之前无法重置。如果我在执行任何其他操作之前设置此 属性,它将起作用。请在这里找到更详细的答案:
http://hortonworks.com/community/forums/topic/help-with-hive-update/
我正在尝试创建一个允许更新的 table。我看过几个关于如何配置它的文档。我们正在使用 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
这是我的 table:
的创建语句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');
如果您发现任何问题或有任何建议,请告诉我。
提前致谢,
克雷格
根据您的 Table 创建命令,很明显您正在创建分桶 table。
“Hive 更新”无法在 Bucketed tables 上执行。
中找到 Hive 更新的限制希望这对您有所帮助:)
问题是在设置 Txn.manager 之前我是 运行 命令(如 "use db_name")。这导致 txn.manager 被设置为初始化并且在打开新会话之前无法重置。如果我在执行任何其他操作之前设置此 属性,它将起作用。请在这里找到更详细的答案:
http://hortonworks.com/community/forums/topic/help-with-hive-update/