Repository: hbase Updated Branches: refs/heads/master 5753d18c7 -> 7c6e839f6
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/7c6e839f Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/7c6e839f Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/7c6e839f Branch: refs/heads/master Commit: 7c6e839f6a98cf2c3ed37109318632db13b4a0df Parents: 5753d18 Author: Esteban Gutierrez <este...@apache.org> Authored: Thu Nov 17 11:11:30 2016 -0800 Committer: Esteban Gutierrez <este...@apache.org> Committed: Thu Nov 17 11:11:30 2016 -0800 ---------------------------------------------------------------------- .../hbase/regionserver/ConstantSizeRegionSplitPolicy.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/7c6e839f/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; } }