Repository: storm Updated Branches: refs/heads/master 64af629a1 -> 4964112d9
STORM-3084 fix Nimbus NPE Project: http://git-wip-us.apache.org/repos/asf/storm/repo Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/fe388df9 Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/fe388df9 Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/fe388df9 Branch: refs/heads/master Commit: fe388df9b3e9649fbdf9f2e57206ee655212bcc6 Parents: 4cd851b Author: Aaron Gresch <[email protected]> Authored: Thu May 24 16:39:07 2018 -0500 Committer: Aaron Gresch <[email protected]> Committed: Thu May 24 16:39:07 2018 -0500 ---------------------------------------------------------------------- .../org/apache/storm/cluster/IStormClusterState.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/storm/blob/fe388df9/storm-client/src/jvm/org/apache/storm/cluster/IStormClusterState.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/cluster/IStormClusterState.java b/storm-client/src/jvm/org/apache/storm/cluster/IStormClusterState.java index 5627997..c586dd1 100644 --- a/storm-client/src/jvm/org/apache/storm/cluster/IStormClusterState.java +++ b/storm-client/src/jvm/org/apache/storm/cluster/IStormClusterState.java @@ -61,7 +61,7 @@ public interface IStormClusterState { Map<String, Assignment> assignmentsInfo(); /** - * Sync the remote state store assignments to local backend, used when master gains leadership, see {@link LeaderListenerCallback} + * Sync the remote state store assignments to local backend, used when master gains leadership, see {@link LeaderListenerCallback}. * * @param remote assigned assignments for a specific {@link IStormClusterState} instance, usually a supervisor/node. */ @@ -75,7 +75,7 @@ public interface IStormClusterState { boolean isAssignmentsBackendSynchronized(); /** - * Mark the assignments as synced successfully, see {@link #isAssignmentsBackendSynchronized()} + * Mark the assignments as synced successfully, see {@link #isAssignmentsBackendSynchronized()}. */ void setAssignmentsBackendSynchronized(); @@ -92,7 +92,7 @@ public interface IStormClusterState { List<String> activeStorms(); /** - * Get a storm base for a topology + * Get a storm base for a topology. * * @param stormId the id of the topology * @param callback something to call if the data changes (best effort) @@ -297,13 +297,16 @@ public interface IStormClusterState { default Map<String, SupervisorInfo> allSupervisorInfo(Runnable callback) { Map<String, SupervisorInfo> ret = new HashMap<>(); for (String id : supervisors(callback)) { - ret.put(id, supervisorInfo(id)); + SupervisorInfo supervisorInfo = supervisorInfo(id); + if (supervisorInfo != null) { + ret.put(id, supervisorInfo); + } } return ret; } /** - * Get a topology ID from the name of a topology + * Get a topology ID from the name of a topology. * * @param topologyName the name of the topology to look for * @return the id of the topology or null if it is not alive. @@ -316,7 +319,7 @@ public interface IStormClusterState { Map<String, StormBase> stormBases = new HashMap<>(); for (String topologyId : activeStorms()) { StormBase base = stormBase(topologyId, null); - if (base != null) { //rece condition with delete + if (base != null) { //race condition with delete stormBases.put(topologyId, base); } }
