Github user srdo commented on a diff in the pull request:
https://github.com/apache/storm/pull/2338#discussion_r140339922
--- Diff:
storm-client/src/jvm/org/apache/storm/cluster/StormClusterStateImpl.java ---
@@ -459,14 +463,15 @@ public boolean topologyBackpressure(String stormId,
Runnable callback) {
backPressureCallback.put(stormId, callback);
}
String path = ClusterUtils.backpressureStormRoot(stormId);
- List<String> childrens = null;
+ long mostRecentTimestamp = 0;
if(stateStorage.node_exists(path, false)) {
- childrens = stateStorage.get_children(path, callback != null);
- } else {
- childrens = new ArrayList<>();
+ List<String> children = stateStorage.get_children(path,
callback != null);
+ mostRecentTimestamp = children.stream().map(childPath ->
stateStorage.get_data(ClusterUtils.backpressurePath(stormId, childPath), false))
--- End diff --
Please put a newline for each part of the stream pipeline, it gets a little
hard to read in the second line here.
---