【问题标题】:HIVE 3.1 - Automatic Major compaction triggered only once per partitionHIVE 3.1 - 每个分区仅触发一次自动主要压缩
【发布时间】:2019-04-12 04:20:44
【问题描述】:

我有一个启用了酸的、分区的、分桶的 hive 表,我正在使用流式客户端对其进行写入。我看到在将记录写入分区时创建了几个增量文件。我想启用自动压缩并尝试了以下基本参数和特定参数:

    hive.support.concurrency=true 
    hive.enforce.bucketing=true 
    hive.exec.dynamic.partition.mode=nonstrict 
    hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager 
    hive.compactor.initiator.on=true 
    hive.compactor.worker.threads=1

与,

hive.compactor.initiator.on=true 
hive.compactor.cleaner.run.interval=5000ms 
hive.compactor.delta.num.threshold=10 
hive.compactor.delta.pct.threshold=0.1f
hive.compactor.abortedtxn.threshold=1000 
hive.compactor.initiator.failed.compacts.threshold=2 
hive.compactor.abortedtxn.threshold=1000

我这样做是希望启用 主要压缩。但是我看到主要压缩仅自动触发一次。即,主要压缩运行一次并创建一个基本文件。一旦为该分区中的许多 delta 文件创建了基本文件,尽管此后有更多的 delta 文件流入该分区,但不会进一步安排主要压缩。如何为表启用自动主要压缩?有没有人遇到过类似的问题?

【问题讨论】:

    标签: hive stream-compaction


    【解决方案1】:

    我有同样的问题,我找到的唯一解决方案是为每个分区运行手动压缩。

    ALTER TABLE myTable PARTITION (myPartitionColumn='myPartitionValue') COMPACT 'major';
    

    我仍在试图弄清楚为什么会发生。

    【讨论】:

      猜你喜欢
      • 2020-03-27
      • 2014-12-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多