hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From este...@apache.org
Subject hbase git commit: HBASE-17058 Lower epsilon used for jitter verification from HBASE-15324
Date Thu, 17 Nov 2016 20:30:11 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.2 e7b310e68 -> bb891c683


HBASE-17058 Lower epsilon used for jitter verification from HBASE-15324


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

Branch: refs/heads/branch-1.2
Commit: bb891c6834a0691302b958d78e0c009b3601c442
Parents: e7b310e
Author: Esteban Gutierrez <esteban@apache.org>
Authored: Thu Nov 17 11:11:30 2016 -0800
Committer: Esteban Gutierrez <esteban@apache.org>
Committed: Thu Nov 17 12:30:03 2016 -0800

----------------------------------------------------------------------
 .../hbase/regionserver/ConstantSizeRegionSplitPolicy.java       | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/bb891c68/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ConstantSizeRegionSplitPolicy.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ConstantSizeRegionSplitPolicy.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ConstantSizeRegionSplitPolicy.java
index 836cec5..d915f2e 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ConstantSizeRegionSplitPolicy.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ConstantSizeRegionSplitPolicy.java
@@ -39,7 +39,6 @@ import org.apache.hadoop.hbase.classification.InterfaceAudience;
 @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CONFIG)
 public class ConstantSizeRegionSplitPolicy extends RegionSplitPolicy {
   private static final Random RANDOM = new Random();
-  private static final double EPSILON = 1E-6;
 
   private long desiredMaxFileSize;
   private double jitterRate;
@@ -60,7 +59,7 @@ public class ConstantSizeRegionSplitPolicy extends RegionSplitPolicy {
     this.jitterRate = (RANDOM.nextFloat() - 0.5D) * jitter;
     long jitterValue = (long) (this.desiredMaxFileSize * this.jitterRate);
     // make sure the long value won't overflow with jitter
-    if (this.jitterRate > EPSILON && jitterValue > (Long.MAX_VALUE - this.desiredMaxFileSize))
{
+    if (this.jitterRate > 0 && jitterValue > (Long.MAX_VALUE - this.desiredMaxFileSize))
{
       this.desiredMaxFileSize = Long.MAX_VALUE;
     } else {
       this.desiredMaxFileSize += jitterValue;
@@ -94,6 +93,6 @@ public class ConstantSizeRegionSplitPolicy extends RegionSplitPolicy {
 
   @VisibleForTesting
   public boolean positiveJitterRate() {
-    return this.jitterRate > EPSILON;
+    return this.jitterRate > 0;
   }
 }


Mime
View raw message