【问题标题】:Hive compactions not triggered automatically - HDP_2.6.5Hive 压缩不会自动触发 - HDP_2.6.5
【发布时间】:2020-03-27 18:59:34
【问题描述】:

我在 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');

在屏幕截图中,我们可以看到创建了许多 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 中,我们可以看到压缩状态已启动但已超过一天未执行。 我们如何使压缩工作?我们还需要设置其他属性吗?

【问题讨论】:

    标签: hadoop hive bigdata hiveql hdp


    【解决方案1】:

    你能检查一下你的 hive 站点配置,'Compactor 使用的线程数'的属性

    如果为 0,则将其更改为大于 0(可能为 2)。然后使用“show compactions;”检查压缩状态。

    【讨论】:

      猜你喜欢
      • 2019-04-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-05
      • 2019-08-10
      • 1970-01-01
      • 1970-01-01
      • 2013-01-18
      相关资源
      最近更新 更多