incubator-s4-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dfe...@apache.org
Subject [2/3] git commit: Change Global Task name ("GLOBAL") and precedence
Date Fri, 22 Feb 2013 17:56:14 GMT
Change Global Task name ("GLOBAL") and precedence


Project: http://git-wip-us.apache.org/repos/asf/incubator-s4/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s4/commit/88b0acfa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s4/tree/88b0acfa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s4/diff/88b0acfa

Branch: refs/heads/S4-110-new
Commit: 88b0acfa1ab5aa8f91a4a1ce7b59e54304b0dc6e
Parents: 36acbce
Author: Daniel Gómez Ferro <danielgf@yahoo-inc.com>
Authored: Fri Feb 22 12:34:19 2013 +0100
Committer: Daniel Gómez Ferro <danielgf@yahoo-inc.com>
Committed: Fri Feb 22 12:34:19 2013 +0100

----------------------------------------------------------------------
 .../apache/s4/comm/topology/ClusterFromHelix.java  |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/88b0acfa/subprojects/s4-comm/src/main/java/org/apache/s4/comm/topology/ClusterFromHelix.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/topology/ClusterFromHelix.java
b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/topology/ClusterFromHelix.java
index 8a77606..fd2afe8 100644
--- a/subprojects/s4-comm/src/main/java/org/apache/s4/comm/topology/ClusterFromHelix.java
+++ b/subprojects/s4-comm/src/main/java/org/apache/s4/comm/topology/ClusterFromHelix.java
@@ -288,9 +288,9 @@ public class ClusterFromHelix extends RoutingTableProvider implements
Cluster {
         if (typeMap == null)
             return null;
         
-        Map<Integer, Destination> streamMap =typeMap.get("TASK");
+        Map<Integer, Destination> streamMap = typeMap.get(streamName);
         if(streamMap==null){
-            streamMap = typeMap.get(streamName);
+            streamMap = typeMap.get(S4HelixConstants.GLOBAL_TASK_NAME);
         }
         if (streamMap == null)
             return null;
@@ -302,9 +302,9 @@ public class ClusterFromHelix extends RoutingTableProvider implements
Cluster {
     public Integer getPartitionCount(String streamName) {
         
         Integer numPartitions;
-        numPartitions = partitionCountMapRef.get().get("TASK");
+        numPartitions = partitionCountMapRef.get().get(streamName);
         if(numPartitions==null){
-            numPartitions = partitionCountMapRef.get().get(streamName);
+            numPartitions = partitionCountMapRef.get().get(S4HelixConstants.GLOBAL_TASK_NAME);
         }
         if (numPartitions == null) {
             return -1;


Mime
View raw message