geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bschucha...@apache.org
Subject [16/50] [abbrv] incubator-geode git commit: GEODE-124: Rename size-minimum to minimum-size
Date Fri, 14 Aug 2015 20:40:05 GMT
GEODE-124: Rename size-minimum to minimum-size

Mimimum-size is easier to read and represents the property better.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/0ff54f3e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/0ff54f3e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/0ff54f3e

Branch: refs/heads/feature/GEODE-77
Commit: 0ff54f3e85f078e6c775e36192a5863b18c45f81
Parents: 856fa0c
Author: Ashvin Agrawal <ashvin@apache.org>
Authored: Mon Aug 3 13:38:29 2015 -0700
Committer: Ashvin Agrawal <ashvin@apache.org>
Committed: Mon Aug 3 14:02:50 2015 -0700

----------------------------------------------------------------------
 .../gemstone/gemfire/cache/util/AutoBalancer.java   | 16 ++++++++--------
 .../gemfire/cache/util/AutoBalancerJUnitTest.java   | 12 ++++++------
 2 files changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0ff54f3e/gemfire-rebalancer/src/main/java/com/gemstone/gemfire/cache/util/AutoBalancer.java
----------------------------------------------------------------------
diff --git a/gemfire-rebalancer/src/main/java/com/gemstone/gemfire/cache/util/AutoBalancer.java
b/gemfire-rebalancer/src/main/java/com/gemstone/gemfire/cache/util/AutoBalancer.java
index 72a2f95..00ebc5f 100644
--- a/gemfire-rebalancer/src/main/java/com/gemstone/gemfire/cache/util/AutoBalancer.java
+++ b/gemfire-rebalancer/src/main/java/com/gemstone/gemfire/cache/util/AutoBalancer.java
@@ -99,17 +99,17 @@ public class AutoBalancer implements Declarable {
    * the total number of bytes rebalance operation may move is more than this
    * number of bytes.
    * <P>
-   * Default {@value AutoBalancer#DEFAULT_SIZE_MINIMUM}
+   * Default {@value AutoBalancer#DEFAULT_MINIMUM_SIZE}
    */
-  public static final String SIZE_MINIMUM = "size-minimum";
+  public static final String MINIMUM_SIZE = "minimum-size";
 
   /**
-   * Default value of {@link AutoBalancer#SIZE_MINIMUM}. In the initial data
+   * Default value of {@link AutoBalancer#MINIMUM_SIZE}. In the initial data
    * load phases, {@link AutoBalancer#SIZE_THRESHOLD_PERCENT} based rebalance
    * invocation may be unnecessary. Do not rebalance if the data to be moved is
    * less than 100MB
    */
-  public static final int DEFAULT_SIZE_MINIMUM = 100 * 1024 * 1024;
+  public static final int DEFAULT_MINIMUM_SIZE = 100 * 1024 * 1024;
 
   /**
    * Name of the DistributedLockService that {@link AutoBalancer} will use to
@@ -217,7 +217,7 @@ public class AutoBalancer implements Declarable {
    */
   class SizeBasedOOBAuditor implements OOBAuditor {
     private int sizeThreshold = DEFAULT_SIZE_THRESHOLD_PERCENT;
-    private int sizeMinimum = DEFAULT_SIZE_MINIMUM;
+    private int sizeMinimum = DEFAULT_MINIMUM_SIZE;
 
     @Override
     public void init(Properties props) {
@@ -232,10 +232,10 @@ public class AutoBalancer implements Declarable {
             throw new GemFireConfigException(SIZE_THRESHOLD_PERCENT + " should be integer,
1 to 99");
           }
         }
-        if (props.getProperty(SIZE_MINIMUM) != null) {
-          sizeMinimum = Integer.valueOf(props.getProperty(SIZE_MINIMUM));
+        if (props.getProperty(MINIMUM_SIZE) != null) {
+          sizeMinimum = Integer.valueOf(props.getProperty(MINIMUM_SIZE));
           if (sizeMinimum <= 0) {
-            throw new GemFireConfigException(SIZE_MINIMUM + " should be greater than 0");
+            throw new GemFireConfigException(MINIMUM_SIZE + " should be greater than 0");
           }
         }
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0ff54f3e/gemfire-rebalancer/src/test/java/com/gemstone/gemfire/cache/util/AutoBalancerJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-rebalancer/src/test/java/com/gemstone/gemfire/cache/util/AutoBalancerJUnitTest.java
b/gemfire-rebalancer/src/test/java/com/gemstone/gemfire/cache/util/AutoBalancerJUnitTest.java
index 93680f6..bae5f11 100644
--- a/gemfire-rebalancer/src/test/java/com/gemstone/gemfire/cache/util/AutoBalancerJUnitTest.java
+++ b/gemfire-rebalancer/src/test/java/com/gemstone/gemfire/cache/util/AutoBalancerJUnitTest.java
@@ -365,7 +365,7 @@ public class AutoBalancerJUnitTest {
     AutoBalancer balancer = new AutoBalancer();
     balancer.setCacheOperationFacade(mockCacheFacade);
     Properties config = getBasicConfig();
-    config.put(AutoBalancer.SIZE_MINIMUM, "10");
+    config.put(AutoBalancer.MINIMUM_SIZE, "10");
     balancer.init(config);
     SizeBasedOOBAuditor auditor = (SizeBasedOOBAuditor) balancer.getOOBAuditor();
 
@@ -398,7 +398,7 @@ public class AutoBalancerJUnitTest {
     AutoBalancer balancer = new AutoBalancer();
     balancer.setCacheOperationFacade(mockCacheFacade);
     Properties config = getBasicConfig();
-    config.put(AutoBalancer.SIZE_MINIMUM, "" + (totalSize * 5));
+    config.put(AutoBalancer.MINIMUM_SIZE, "" + (totalSize * 5));
     balancer.init(config);
     SizeBasedOOBAuditor auditor = (SizeBasedOOBAuditor) balancer.getOOBAuditor();
 
@@ -439,7 +439,7 @@ public class AutoBalancerJUnitTest {
     AutoBalancer balancer = new AutoBalancer();
     balancer.setCacheOperationFacade(mockCacheFacade);
     Properties config = getBasicConfig();
-    config.put(AutoBalancer.SIZE_MINIMUM, "10");
+    config.put(AutoBalancer.MINIMUM_SIZE, "10");
     balancer.init(config);
     SizeBasedOOBAuditor auditor = (SizeBasedOOBAuditor) balancer.getOOBAuditor();
 
@@ -531,11 +531,11 @@ public class AutoBalancerJUnitTest {
     balancer.init(getBasicConfig());
     SizeBasedOOBAuditor auditor = (SizeBasedOOBAuditor) balancer.getOOBAuditor();
     assertEquals(AutoBalancer.DEFAULT_SIZE_THRESHOLD_PERCENT, auditor.getSizeThreshold());
-    assertEquals(AutoBalancer.DEFAULT_SIZE_MINIMUM, auditor.getSizeMinimum());
+    assertEquals(AutoBalancer.DEFAULT_MINIMUM_SIZE, auditor.getSizeMinimum());
 
     Properties props = getBasicConfig();
     props.put(AutoBalancer.SIZE_THRESHOLD_PERCENT, "17");
-    props.put(AutoBalancer.SIZE_MINIMUM, "10");
+    props.put(AutoBalancer.MINIMUM_SIZE, "10");
     balancer = new AutoBalancer();
     balancer.init(props);
     auditor = (SizeBasedOOBAuditor) balancer.getOOBAuditor();
@@ -555,7 +555,7 @@ public class AutoBalancerJUnitTest {
   public void testConfigSizeMinNegative() {
     AutoBalancer balancer = new AutoBalancer();
     Properties props = getBasicConfig();
-    props.put(AutoBalancer.SIZE_MINIMUM, "-1");
+    props.put(AutoBalancer.MINIMUM_SIZE, "-1");
     balancer.init(props);
   }
 


Mime
View raw message