hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1031349 - /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
Date Thu, 04 Nov 2010 23:33:14 GMT
Author: stack
Date: Thu Nov  4 23:33:14 2010
New Revision: 1031349

URL: http://svn.apache.org/viewvc?rev=1031349&view=rev
Log:
HBASE-3189 Stagger Major Compactions  -- addendum

Modified:
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java?rev=1031349&r1=1031348&r2=1031349&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java Thu Nov  4 23:33:14
2010
@@ -799,11 +799,12 @@ public class Store implements HeapSize {
     }
     
     if (ret > 0) {
-      // default = +/- 4 hrs
-      long jitter =  conf.getLong("hbase.hregion.majorcompaction.jitter", 
-          1000*60*60*4);
-      if (jitter > 0) {
-        ret += jitter - Math.round(jitter * 2 * Math.random());
+      // default = 20% = +/- 4.8 hrs
+      double jitterPct =  conf.getFloat("hbase.hregion.majorcompaction.jitter",
+          0.20F);
+      if (jitterPct > 0) {
+        long jitter = Math.round(ret * jitterPct);
+        ret += jitter - Math.round(2L * jitter * Math.random());
       }
     }
     return ret;



Mime
View raw message