Return-Path: X-Original-To: apmail-geode-commits-archive@minotaur.apache.org Delivered-To: apmail-geode-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 912BB187C9 for ; Fri, 14 Aug 2015 20:40:15 +0000 (UTC) Received: (qmail 46000 invoked by uid 500); 14 Aug 2015 20:40:15 -0000 Delivered-To: apmail-geode-commits-archive@geode.apache.org Received: (qmail 45898 invoked by uid 500); 14 Aug 2015 20:40:15 -0000 Mailing-List: contact commits-help@geode.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.incubator.apache.org Delivered-To: mailing list commits@geode.incubator.apache.org Received: (qmail 45882 invoked by uid 99); 14 Aug 2015 20:40:15 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Aug 2015 20:40:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 30570C5D80 for ; Fri, 14 Aug 2015 20:40:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.794 X-Spam-Level: * X-Spam-Status: No, score=1.794 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.006] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id qPaDhyL89TvJ for ; Fri, 14 Aug 2015 20:40:00 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with SMTP id 012F6212D8 for ; Fri, 14 Aug 2015 20:39:52 +0000 (UTC) Received: (qmail 41915 invoked by uid 99); 14 Aug 2015 20:39:51 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Aug 2015 20:39:51 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 1FCE6E1810; Fri, 14 Aug 2015 20:39:51 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bschuchardt@apache.org To: commits@geode.incubator.apache.org Date: Fri, 14 Aug 2015 20:40:05 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [16/50] [abbrv] incubator-geode git commit: GEODE-124: Rename size-minimum to minimum-size 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 Authored: Mon Aug 3 13:38:29 2015 -0700 Committer: Ashvin Agrawal 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. *

- * 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); }