This is an automated email from the ASF dual-hosted git repository. nic pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kylin.git
commit 03274297b1dcdd26a93ee6903e764d92e8847a85 Author: Zhong, Yanghong <nju_y...@apache.org> AuthorDate: Tue Mar 10 14:55:35 2020 +0800 KYLIN-4416 Disable htable compaction --- .../src/main/java/org/apache/kylin/common/KylinConfigBase.java | 4 ++++ .../java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java | 4 ++-- .../java/org/apache/kylin/storage/hbase/steps/CubeHTableUtil.java | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java index 7136a51..b0f7fec 100644 --- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java +++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java @@ -1263,6 +1263,10 @@ public abstract class KylinConfigBase implements Serializable { return Integer.parseInt(getOptional("kylin.storage.hbase.htable-available-retry", "3")); } + public int getHBaseRegionCompactionThreshold() { + return Integer.parseInt(getOptional("kylin.storage.hbase.region-compaction-threshold", "3")); + } + public int getHBaseRegionCountMin() { return Integer.parseInt(getOptional("kylin.storage.hbase.min-region-count", "1")); } diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java index 7c970c2..4315957 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java @@ -280,8 +280,8 @@ public class CreateHTableJob extends AbstractHadoopJob { hfileSizeMB = mbPerRegion / 2f; } - int compactionThreshold = Integer.parseInt(hbaseConf.get("hbase.hstore.compactionThreshold", "3")); - logger.info("hbase.hstore.compactionThreshold is {}", compactionThreshold); + int compactionThreshold = kylinConfig.getHBaseRegionCompactionThreshold(); + logger.info("kylin.storage.hbase.region-compaction-threshold is " + compactionThreshold); if (hfileSizeMB > 0.0f && hfileSizeMB * compactionThreshold < mbPerRegion) { hfileSizeMB = ((float) mbPerRegion) / compactionThreshold; } diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CubeHTableUtil.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CubeHTableUtil.java index 369c7bc..b99e46c 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CubeHTableUtil.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CubeHTableUtil.java @@ -66,6 +66,7 @@ public class CubeHTableUtil { KylinConfig kylinConfig = cubeDesc.getConfig(); HTableDescriptor tableDesc = new HTableDescriptor(tableName); + tableDesc.setCompactionEnabled(false); tableDesc.setValue(HTableDescriptor.SPLIT_POLICY, DisabledRegionSplitPolicy.class.getName()); tableDesc.setValue(IRealizationConstants.HTableTag, kylinConfig.getMetadataUrlPrefix()); tableDesc.setValue(IRealizationConstants.HTableCreationTime, String.valueOf(System.currentTimeMillis()));