Repository: storm Updated Branches: refs/heads/master bca4761d7 -> 4c3a9bdc0
STORM-1311: Fix for visualization when sys metrics aren't present yet Project: http://git-wip-us.apache.org/repos/asf/storm/repo Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/490fe49a Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/490fe49a Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/490fe49a Branch: refs/heads/master Commit: 490fe49afac3b86057f713daf473d03dcf165569 Parents: 94c6a64 Author: Govind Menon <govindappume...@gmail.com> Authored: Mon Sep 24 14:55:22 2018 -0500 Committer: Govind Menon <govindappume...@gmail.com> Committed: Mon Sep 24 14:55:22 2018 -0500 ---------------------------------------------------------------------- .../java/org/apache/storm/daemon/ui/UIHelpers.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/storm/blob/490fe49a/storm-webapp/src/main/java/org/apache/storm/daemon/ui/UIHelpers.java ---------------------------------------------------------------------- diff --git a/storm-webapp/src/main/java/org/apache/storm/daemon/ui/UIHelpers.java b/storm-webapp/src/main/java/org/apache/storm/daemon/ui/UIHelpers.java index e562167..f452d27 100644 --- a/storm-webapp/src/main/java/org/apache/storm/daemon/ui/UIHelpers.java +++ b/storm-webapp/src/main/java/org/apache/storm/daemon/ui/UIHelpers.java @@ -1717,13 +1717,17 @@ public class UIHelpers { Map<String, Object> spoutData = new HashMap(); spoutData.put(":type", "spout"); spoutData.put(":capacity", 0); - Map<String, Map> spoutStreamsStats = StatsUtil.spoutStreamsStats(spoutSummaries.get(spoutComponentId), true); + Map<String, Map> spoutStreamsStats = + StatsUtil.spoutStreamsStats(spoutSummaries.get(spoutComponentId), sys); spoutData.put(":latency", spoutStreamsStats.get("complete-latencies").get(window)); spoutData.put(":transferred", spoutStreamsStats.get("transferred").get(window)); spoutData.put(":stats", spoutSummaries.get( spoutComponentId).stream().map( UIHelpers::getStatMapFromExecutorSummary).collect(Collectors.toList())); - spoutData.put(":link", UIHelpers.urlFormat("/component.html?id=%s&topology_id=%s", spoutComponentId, topoId)); + spoutData.put( + ":link", + UIHelpers.urlFormat("/component.html?id=%s&topology_id=%s", spoutComponentId, topoId) + ); spoutData.put(":inputs", spoutSpecMapEntry.getValue().get_common().get_inputs().entrySet().stream().map( @@ -1739,13 +1743,17 @@ public class UIHelpers { Map<String, Object> boltMap = new HashMap(); boltMap.put(":type", "bolt"); boltMap.put(":capacity", StatsUtil.computeBoltCapacity(boltSummaries.get(boltComponentId))); - Map<String, Map> boltStreamsStats = StatsUtil.boltStreamsStats(boltSummaries.get(boltComponentId), true); + Map<String, Map> boltStreamsStats = + StatsUtil.boltStreamsStats(boltSummaries.get(boltComponentId), sys); boltMap.put(":latency", boltStreamsStats.get("process-latencies").get(window)); boltMap.put(":transferred", boltStreamsStats.get("transferred").get(window)); boltMap.put(":stats", boltSummaries.get( boltComponentId).stream().map( UIHelpers::getStatMapFromExecutorSummary).collect(Collectors.toList())); - boltMap.put(":link", UIHelpers.urlFormat("/component.html?id=%s&topology_id=%s", boltComponentId, topoId)); + boltMap.put( + ":link", + UIHelpers.urlFormat("/component.html?id=%s&topology_id=%s", boltComponentId, topoId) + ); boltMap.put(":inputs", boltEntry.getValue().get_common().get_inputs().entrySet().stream().map(