From 528b2c2d32a9d2883eee0b21c71cd650fffe9cdc Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Wed, 19 May 2010 18:28:05 +0000 Subject: [PATCH] HBASE-2559 Set hbase.hregion.majorcompaction to 0 to disable git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@946326 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 1 + .../main/java/org/apache/hadoop/hbase/regionserver/Store.java | 3 ++- core/src/main/resources/hbase-default.xml | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) 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.