You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by ka...@apache.org on 2018/08/11 11:55:55 UTC

[1/2] storm git commit: STORM-3183: Fix for visualization on Storm API

Repository: storm
Updated Branches:
  refs/heads/master 154173a70 -> c2931dab7


STORM-3183: Fix for visualization on Storm API


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

Branch: refs/heads/master
Commit: 078e8cc239788bbec14a0e38492ed683341af7dc
Parents: 16e5008
Author: Govind Menon <go...@gmail.com>
Authored: Thu Aug 9 13:51:10 2018 -0500
Committer: Govind Menon <go...@gmail.com>
Committed: Fri Aug 10 17:25:05 2018 -0500

----------------------------------------------------------------------
 .../org/apache/storm/daemon/ui/UIHelpers.java   | 49 ++++++++++----------
 1 file changed, 24 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/078e8cc2/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 d6dc409..a080599 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
@@ -1348,12 +1348,12 @@ public class UIHelpers {
      */
     public static Map<String, Object> getStatMapFromExecutorSummary(ExecutorSummary executorSummary) {
         Map<String, Object> result = new HashMap();
-        result.put("host", executorSummary.get_host());
-        result.put("port", executorSummary.get_port());
-        result.put("uptime_secs", executorSummary.get_uptime_secs());
-        result.put("transferred", null);
+        result.put(":host", executorSummary.get_host());
+        result.put(":port", executorSummary.get_port());
+        result.put(":uptime_secs", executorSummary.get_uptime_secs());
+        result.put(":transferred", null);
         if (executorSummary.is_set_stats()) {
-            result.put("transferred", sanitizeTransferredStats(executorSummary.get_stats().get_transferred()));
+            result.put(":transferred", sanitizeTransferredStats(executorSummary.get_stats().get_transferred()));
         }
         return result;
     }
@@ -1366,12 +1366,11 @@ public class UIHelpers {
      * @return getInputMap
      */
     public static Map<String, Object> getInputMap(Map.Entry<GlobalStreamId,Grouping> entryInput) {
-
         Map<String, Object> result = new HashMap();
-        result.put("component", entryInput.getKey().get_componentId());
-        result.put("stream", entryInput.getKey().get_streamId());
-        result.put("sani-stream", sanitizeStreamName(entryInput.getKey().get_streamId()));
-        result.put("grouping", entryInput.getValue().getSetField().getFieldName());
+        result.put(":component", entryInput.getKey().get_componentId());
+        result.put(":stream", entryInput.getKey().get_streamId());
+        result.put(":sani-stream", sanitizeStreamName(entryInput.getKey().get_streamId()));
+        result.put(":grouping", entryInput.getValue().getSetField().getFieldName());
         return result;
     }
 
@@ -1402,17 +1401,17 @@ public class UIHelpers {
             String spoutComponentId = spoutSpecMapEntry.getKey();
             if (spoutSummaries.containsKey(spoutComponentId)) {
                 Map<String, Object> spoutData = new HashMap();
-                spoutData.put("type", "spout");
-                spoutData.put("capacity", 0);
+                spoutData.put(":type", "spout");
+                spoutData.put(":capacity", 0);
                 Map<String, Map> spoutStreamsStats = StatsUtil.spoutStreamsStats(spoutSummaries.get(spoutComponentId), true);
-                spoutData.put("latency", spoutStreamsStats.get("complete-latencies").get(window));
-                spoutData.put("transferred", spoutStreamsStats.get("transferred").get(window));
-                spoutData.put("stats", spoutSummaries.get(
+                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));
 
-                result.put("inputs",
+                spoutData.put(":inputs",
                     spoutSpecMapEntry.getValue().get_common().get_inputs().entrySet().stream().map(
                             UIHelpers::getInputMap).collect(Collectors.toList())
                 );
@@ -1422,19 +1421,19 @@ public class UIHelpers {
 
         for (Map.Entry<String, Bolt> boltEntry : boltSpecs.entrySet()) {
             String boltComponentId = boltEntry.getKey();
-            if (boltSummaries.containsKey(boltComponentId) && (sys || Utils.isSystemId(boltComponentId))) {
+            if (boltSummaries.containsKey(boltComponentId) && (sys || !Utils.isSystemId(boltComponentId))) {
                 Map<String, Object> boltMap = new HashMap();
-                boltMap.put("type", "bolt");
-                boltMap.put("capacity", StatsUtil.computeBoltCapacity(boltSummaries.get(boltComponentId)));
+                boltMap.put(":type", "bolt");
+                boltMap.put(":capacity", StatsUtil.computeBoltCapacity(boltSummaries.get(boltComponentId)));
                 Map<String, Map> boltStreamsStats = StatsUtil.boltStreamsStats(boltSummaries.get(boltComponentId), true);
-                boltMap.put("latency", boltStreamsStats.get("process-latencies").get(window));
-                boltMap.put("transferred", boltStreamsStats.get("transferred").get(window));
-                boltMap.put("stats", boltSummaries.get(
+                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));
 
-                result.put("inputs",
+                boltMap.put(":inputs",
                         boltEntry.getValue().get_common().get_inputs().entrySet().stream().map(
                                 UIHelpers::getInputMap).collect(Collectors.toList())
                 );


[2/2] storm git commit: Merge branch 'STORM-3183' of https://github.com/govind-menon/storm into STORM-3183-merge

Posted by ka...@apache.org.
Merge branch 'STORM-3183' of https://github.com/govind-menon/storm into STORM-3183-merge


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

Branch: refs/heads/master
Commit: c2931dab720a2f6dcafa80a2a771c970302dca86
Parents: 154173a 078e8cc
Author: Jungtaek Lim <ka...@gmail.com>
Authored: Sat Aug 11 20:55:44 2018 +0900
Committer: Jungtaek Lim <ka...@gmail.com>
Committed: Sat Aug 11 20:55:44 2018 +0900

----------------------------------------------------------------------
 .../org/apache/storm/daemon/ui/UIHelpers.java   | 49 ++++++++++----------
 1 file changed, 24 insertions(+), 25 deletions(-)
----------------------------------------------------------------------