storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject [1/3] storm git commit: Check if /backpressure/storm-id before requesting children
Date Fri, 04 Mar 2016 15:44:46 GMT
Repository: storm
Updated Branches:
  refs/heads/master 672c8951b -> cc7ef89c3


Check if /backpressure/storm-id before requesting children


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

Branch: refs/heads/master
Commit: 177a4c3ad269855532edc7c00312c7a79e1a4da7
Parents: df54280
Author: Kishor Patil <kpatil@yahoo-inc.com>
Authored: Thu Mar 3 12:32:19 2016 -0600
Committer: Kishor Patil <kpatil@yahoo-inc.com>
Committed: Thu Mar 3 12:32:19 2016 -0600

----------------------------------------------------------------------
 .../jvm/org/apache/storm/cluster/StormClusterStateImpl.java   | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/177a4c3a/storm-core/src/jvm/org/apache/storm/cluster/StormClusterStateImpl.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/cluster/StormClusterStateImpl.java b/storm-core/src/jvm/org/apache/storm/cluster/StormClusterStateImpl.java
index 684bfe1..bb67d97 100644
--- a/storm-core/src/jvm/org/apache/storm/cluster/StormClusterStateImpl.java
+++ b/storm-core/src/jvm/org/apache/storm/cluster/StormClusterStateImpl.java
@@ -446,7 +446,12 @@ public class StormClusterStateImpl implements IStormClusterState {
             backPressureCallback.put(stormId, callback);
         }
         String path = ClusterUtils.backpressureStormRoot(stormId);
-        List<String> childrens = stateStorage.get_children(path, callback != null);
+        List<String> childrens = null;
+        if(stateStorage.node_exists(path, false)) {
+            childrens = stateStorage.get_children(path, callback != null);
+        } else {
+            childrens = new ArrayList<>();
+        }
         return childrens.size() > 0;
 
     }


Mime
View raw message