簡體   English   中英

Hive 壓縮未自動觸發 - HDP_2.6.5

[英]Hive compactions not triggered automatically - HDP_2.6.5

我在 hive 中創建了一個表來測試壓縮,

CREATE TABLE part_test(id int, name string, city string) PARTITIONED BY (dept string)  clustered by (city) into 5 buckets stored as orc TBLPROPERTIES('transactional'='true');

截圖 1

在屏幕截圖中,我們可以看到創建了許多 delta 目錄(大約 12 個文件)。

壓縮是自動啟動的,但它不會運行或用於壓縮增量目錄。以下是我們在 hive 中設置的屬性。

set hive.compactor.initiator.on=true;
set hive.compactor.worker.threads=1;
set hive.compactor.delta.pct.threshold=0.1f;
set hive.compactor.delta.num.threshold=10;
set hive.exec.dynamic.partition=true;  
set hive.exec.dynamic.partition.mode=nonstrict; 
set hive.enforce.bucketing=true;

在截圖 2 中,我們可以看到壓縮狀態為已啟動但未執行超過一天。 我們如何使壓縮工作? 我們需要設置任何其他屬性嗎?

截圖2

你能檢查你的蜂巢站點配置,'Compactor 使用的線程數'的屬性嗎?

如果為 0,則將其更改為大於 0(可能為 2)。 然后使用“show compactions;”檢查壓縮狀態。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM