Repository: storm
Updated Branches:
  refs/heads/master a323987bb -> ab7b4ca77


[STORM-2932] the naming of topology localityaware configs are confusing


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

Branch: refs/heads/master
Commit: 2bd8a1a1dc1aff169ab61ce98f1893d4911d2795
Parents: 7fbe7a2
Author: Ethan Li <ethanopensou...@gmail.com>
Authored: Fri Feb 2 11:19:52 2018 -0600
Committer: Ethan Li <ethanopensou...@gmail.com>
Committed: Fri Feb 2 11:34:32 2018 -0600

----------------------------------------------------------------------
 conf/defaults.yaml                                               | 4 ++--
 storm-client/src/jvm/org/apache/storm/Config.java                | 4 ++--
 .../jvm/org/apache/storm/grouping/LoadAwareShuffleGrouping.java  | 4 ++--
 .../org/apache/storm/grouping/LoadAwareShuffleGroupingTest.java  | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/2bd8a1a1/conf/defaults.yaml
----------------------------------------------------------------------
diff --git a/conf/defaults.yaml b/conf/defaults.yaml
index e15a265..243f210 100644
--- a/conf/defaults.yaml
+++ b/conf/defaults.yaml
@@ -258,8 +258,8 @@ topology.disruptor.batch.size: 100
 topology.disruptor.batch.timeout.millis: 1
 topology.disable.loadaware.messaging: false
 topology.state.checkpoint.interval.ms: 1000
-topology.localityaware.higher.bound.percent: 0.8
-topology.localityaware.lower.bound.percent: 0.2
+topology.localityaware.higher.bound: 0.8
+topology.localityaware.lower.bound: 0.2
 topology.serialized.message.size.metrics: false
 
 # Configs for Resource Aware Scheduler

http://git-wip-us.apache.org/repos/asf/storm/blob/2bd8a1a1/storm-client/src/jvm/org/apache/storm/Config.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/Config.java 
b/storm-client/src/jvm/org/apache/storm/Config.java
index 7014dfd..000c9b5 100644
--- a/storm-client/src/jvm/org/apache/storm/Config.java
+++ b/storm-client/src/jvm/org/apache/storm/Config.java
@@ -73,7 +73,7 @@ public class Config extends HashMap<String, Object> {
      */
     @isPositiveNumber
     @NotNull
-    public static final String TOPOLOGY_LOCALITYAWARE_HIGHER_BOUND_PERCENT = 
"topology.localityaware.higher.bound.percent";
+    public static final String TOPOLOGY_LOCALITYAWARE_HIGHER_BOUND = 
"topology.localityaware.higher.bound";
 
     /**
      * This signifies the load congestion among target tasks in scope. 
Currently it's only used in LoadAwareShuffleGrouping.
@@ -82,7 +82,7 @@ public class Config extends HashMap<String, Object> {
      */
     @isPositiveNumber
     @NotNull
-    public static final String TOPOLOGY_LOCALITYAWARE_LOWER_BOUND_PERCENT = 
"topology.localityaware.lower.bound.percent";
+    public static final String TOPOLOGY_LOCALITYAWARE_LOWER_BOUND = 
"topology.localityaware.lower.bound";
 
     /**
      * Try to serialize all tuples, even for local transfers.  This should 
only be used

http://git-wip-us.apache.org/repos/asf/storm/blob/2bd8a1a1/storm-client/src/jvm/org/apache/storm/grouping/LoadAwareShuffleGrouping.java
----------------------------------------------------------------------
diff --git 
a/storm-client/src/jvm/org/apache/storm/grouping/LoadAwareShuffleGrouping.java 
b/storm-client/src/jvm/org/apache/storm/grouping/LoadAwareShuffleGrouping.java
index 3fd75e5..2b0b481 100644
--- 
a/storm-client/src/jvm/org/apache/storm/grouping/LoadAwareShuffleGrouping.java
+++ 
b/storm-client/src/jvm/org/apache/storm/grouping/LoadAwareShuffleGrouping.java
@@ -89,8 +89,8 @@ public class LoadAwareShuffleGrouping implements 
LoadAwareCustomStreamGrouping,
         dnsToSwitchMapping = ReflectionUtils.newInstance((String) 
conf.get(Config.STORM_NETWORK_TOPOGRAPHY_PLUGIN));
         localityGroup = new HashMap<>();
         currentScope = Scope.WORKER_LOCAL;
-        higherBound = 
ObjectReader.getDouble(conf.get(Config.TOPOLOGY_LOCALITYAWARE_HIGHER_BOUND_PERCENT));
-        lowerBound = 
ObjectReader.getDouble(conf.get(Config.TOPOLOGY_LOCALITYAWARE_LOWER_BOUND_PERCENT));
+        higherBound = 
ObjectReader.getDouble(conf.get(Config.TOPOLOGY_LOCALITYAWARE_HIGHER_BOUND));
+        lowerBound = 
ObjectReader.getDouble(conf.get(Config.TOPOLOGY_LOCALITYAWARE_LOWER_BOUND));
 
         rets = (List<Integer>[]) new List<?>[targetTasks.size()];
         int i = 0;

http://git-wip-us.apache.org/repos/asf/storm/blob/2bd8a1a1/storm-client/test/jvm/org/apache/storm/grouping/LoadAwareShuffleGroupingTest.java
----------------------------------------------------------------------
diff --git 
a/storm-client/test/jvm/org/apache/storm/grouping/LoadAwareShuffleGroupingTest.java
 
b/storm-client/test/jvm/org/apache/storm/grouping/LoadAwareShuffleGroupingTest.java
index d704900..e72cc4e 100644
--- 
a/storm-client/test/jvm/org/apache/storm/grouping/LoadAwareShuffleGroupingTest.java
+++ 
b/storm-client/test/jvm/org/apache/storm/grouping/LoadAwareShuffleGroupingTest.java
@@ -65,8 +65,8 @@ public class LoadAwareShuffleGroupingTest {
     private WorkerTopologyContext mockContext(List<Integer> availableTaskIds) {
         Map<String, Object> conf = new HashMap<>();
         conf.put(Config.STORM_NETWORK_TOPOGRAPHY_PLUGIN, 
"org.apache.storm.networktopography.DefaultRackDNSToSwitchMapping");
-        conf.put(Config.TOPOLOGY_LOCALITYAWARE_HIGHER_BOUND_PERCENT, 0.8);
-        conf.put(Config.TOPOLOGY_LOCALITYAWARE_LOWER_BOUND_PERCENT, 0.2);
+        conf.put(Config.TOPOLOGY_LOCALITYAWARE_HIGHER_BOUND, 0.8);
+        conf.put(Config.TOPOLOGY_LOCALITYAWARE_LOWER_BOUND, 0.2);
 
         WorkerTopologyContext context = mock(WorkerTopologyContext.class);
         when(context.getConf()).thenReturn(conf);

Reply via email to