diff --git a/CHANGES.txt b/CHANGES.txt index da543684dbd..c715e54b699 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -649,6 +649,7 @@ Release 0.21.0 - Unreleased desired number of regions HBASE-2529 Make OldLogsCleaner easier to extend HBASE-2527 Add the ability to easily extend some HLog actions + HBASE-2559 Set hbase.hregion.majorcompaction to 0 to disable OPTIMIZATIONS HBASE-410 [testing] Speed up the test suite diff --git a/core/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java b/core/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java index 02a6c167edc..db4ae3b496f 100644 --- a/core/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java +++ b/core/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java @@ -838,7 +838,8 @@ public class Store implements HConstants, HeapSize { private boolean isMajorCompaction(final List filesToCompact) throws IOException { boolean result = false; - if (filesToCompact == null || filesToCompact.isEmpty()) { + if (filesToCompact == null || filesToCompact.isEmpty() || + majorCompactionTime == 0) { return result; } long lowTimestamp = getLowestTimestamp(fs, diff --git a/core/src/main/resources/hbase-default.xml b/core/src/main/resources/hbase-default.xml index f93782a53dc..e3a966927a3 100644 --- a/core/src/main/resources/hbase-default.xml +++ b/core/src/main/resources/hbase-default.xml @@ -394,6 +394,7 @@ 86400000 The time (in miliseconds) between 'major' compactions of all HStoreFiles in a region. Default: 1 day. + Set to 0 to disable automated major compactions.