hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndimi...@apache.org
Subject hbase git commit: HBASE-13865 Increase the default value for hbase.hregion.memstore.block.multipler from 2 to 4 (part 2)
Date Thu, 06 Aug 2015 18:16:39 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 5c0c389b7 -> 51061f08a


HBASE-13865 Increase the default value for hbase.hregion.memstore.block.multipler from 2 to
4 (part 2)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/51061f08
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/51061f08
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/51061f08

Branch: refs/heads/branch-1
Commit: 51061f08a338c2ba6f18e4f702b645fddf194aed
Parents: 5c0c389
Author: Gábor Lipták <gliptak@gmail.com>
Authored: Mon Jun 8 19:53:44 2015 -0400
Committer: Nick Dimiduk <ndimiduk@apache.org>
Committed: Thu Aug 6 10:04:41 2015 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hbase/HConstants.java   | 12 ++++++++++++
 .../org/apache/hadoop/hbase/regionserver/HRegion.java   |  3 ++-
 .../apache/hadoop/hbase/client/TestClientPushback.java  |  2 +-
 .../hadoop/hbase/regionserver/TestCompaction.java       |  2 +-
 .../hadoop/hbase/regionserver/TestMajorCompaction.java  |  2 +-
 .../hadoop/hbase/regionserver/TestMinorCompaction.java  |  2 +-
 6 files changed, 18 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/51061f08/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
index 976bfc5..5fafda0 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
@@ -353,6 +353,18 @@ public final class HConstants {
    */
   public static final int DEFAULT_HSTORE_OPEN_AND_CLOSE_THREADS_MAX = 1;
 
+  /**
+   * Block updates if memstore has hbase.hregion.memstore.block.multiplier
+   * times hbase.hregion.memstore.flush.size bytes.  Useful preventing
+   * runaway memstore during spikes in update traffic.
+   */
+  public static final String HREGION_MEMSTORE_BLOCK_MULTIPLIER =
+          "hbase.hregion.memstore.block.multiplier";
+
+  /**
+   * Default value for hbase.hregion.memstore.block.multiplier
+   */
+  public static final int DEFAULT_HREGION_MEMSTORE_BLOCK_MULTIPLIER = 4;
 
   /** Conf key for the memstore size at which we flush the memstore */
   public static final String HREGION_MEMSTORE_FLUSH_SIZE =

http://git-wip-us.apache.org/repos/asf/hbase/blob/51061f08/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
index f572d48..ee81503 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
@@ -760,7 +760,8 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver,
Regi
     }
     this.memstoreFlushSize = flushSize;
     this.blockingMemStoreSize = this.memstoreFlushSize *
-        conf.getLong("hbase.hregion.memstore.block.multiplier", 2);
+        conf.getLong(HConstants.HREGION_MEMSTORE_BLOCK_MULTIPLIER,
+                HConstants.DEFAULT_HREGION_MEMSTORE_BLOCK_MULTIPLIER);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/hbase/blob/51061f08/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientPushback.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientPushback.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientPushback.java
index 1c1a0b2..82836cc 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientPushback.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientPushback.java
@@ -74,7 +74,7 @@ public class TestClientPushback {
     // load
     conf.setLong(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, flushSizeBytes);
     // ensure we block the flushes when we are double that flushsize
-    conf.setLong("hbase.hregion.memstore.block.multiplier", 2);
+    conf.setLong(HConstants.HREGION_MEMSTORE_BLOCK_MULTIPLIER, HConstants.DEFAULT_HREGION_MEMSTORE_BLOCK_MULTIPLIER);
 
     UTIL.startMiniCluster();
     UTIL.createTable(tableName, family);

http://git-wip-us.apache.org/repos/asf/hbase/blob/51061f08/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
index e47c599..43991aa 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
@@ -103,7 +103,7 @@ public class TestCompaction {
 
     // Set cache flush size to 1MB
     conf.setInt(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, 1024 * 1024);
-    conf.setInt("hbase.hregion.memstore.block.multiplier", 100);
+    conf.setInt(HConstants.HREGION_MEMSTORE_BLOCK_MULTIPLIER, 100);
     conf.set(CompactionThroughputControllerFactory.HBASE_THROUGHPUT_CONTROLLER_KEY,
       NoLimitCompactionThroughputController.class.getName());
     compactionThreshold = conf.getInt("hbase.hstore.compactionThreshold", 3);

http://git-wip-us.apache.org/repos/asf/hbase/blob/51061f08/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMajorCompaction.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMajorCompaction.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMajorCompaction.java
index 0dc1686..48a805a 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMajorCompaction.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMajorCompaction.java
@@ -91,7 +91,7 @@ public class TestMajorCompaction {
 
     // Set cache flush size to 1MB
     conf.setInt(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, 1024*1024);
-    conf.setInt("hbase.hregion.memstore.block.multiplier", 100);
+    conf.setInt(HConstants.HREGION_MEMSTORE_BLOCK_MULTIPLIER, 100);
     compactionThreshold = conf.getInt("hbase.hstore.compactionThreshold", 3);
 
     secondRowBytes = START_KEY_BYTES.clone();

http://git-wip-us.apache.org/repos/asf/hbase/blob/51061f08/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinorCompaction.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinorCompaction.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinorCompaction.java
index 7dbe02a..3a1db68 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinorCompaction.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinorCompaction.java
@@ -68,7 +68,7 @@ public class TestMinorCompaction {
 
     // Set cache flush size to 1MB
     conf.setInt(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, 1024*1024);
-    conf.setInt("hbase.hregion.memstore.block.multiplier", 100);
+    conf.setInt(HConstants.HREGION_MEMSTORE_BLOCK_MULTIPLIER, 100);
     compactionThreshold = conf.getInt("hbase.hstore.compactionThreshold", 3);
 
     firstRowBytes = START_KEY_BYTES;


Mime
View raw message