Github user danny0405 commented on a diff in the pull request:
https://github.com/apache/storm/pull/2800#discussion_r212801634
--- Diff: storm-client/src/jvm/org/apache/storm/stats/StatsUtil.java ---
@@ -1565,23 +1565,26 @@ public static ComponentPageInfo aggCompExecsStats(
public static void updateHeartbeatCache(Map<List<Integer>, Map<String,
Object>> cache,
Map<List<Integer>, Map<String,
Object>> executorBeats, Set<List<Integer>> executors,
Integer timeout) {
- //if not executor beats, refresh is-timed-out of the cache which
is done by master
+ assert cache instanceof ConcurrentMap;
+ //Should we enforce update-if-newer policy?
if (executorBeats == null) {
- for (Map.Entry<List<Integer>, Map<String, Object>>
executorbeat : cache.entrySet()) {
- Map<String, Object> beat = executorbeat.getValue();
+ //If not executor beats, refresh is-timed-out of the cache
which is done by master
--- End diff --
Then please check the code invocation when the passed in `executorBeats ==
null`, for `sendSupervisorWorkerHeartbeat` we will never get a null but at
least a empty map.
For testing, i believe there should be some bug to fix, but this code
modification is not that necessary.
---