dandsager1 commented on a change in pull request #3010: STORM-3394 Fix 
placeholder system bolt filtering for Topology page
URL: https://github.com/apache/storm/pull/3010#discussion_r285581928
 
 

 ##########
 File path: 
storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java
 ##########
 @@ -4176,12 +4176,13 @@ private void 
maybeAddPlaceholderSpoutAggStats(TopologyPageInfo topoPageInfo, Sto
      *
      * @param topoPageInfo  topology page info holding bolt AggStats
      * @param topology      storm topology used to get bolt names
+     * @param includeSys    whether to show system bolts
      */
-    private void maybeAddPlaceholderBoltAggStats(TopologyPageInfo 
topoPageInfo, StormTopology topology) {
+    private void maybeAddPlaceholderBoltAggStats(TopologyPageInfo 
topoPageInfo, StormTopology topology, boolean includeSys) {
         if (topoPageInfo.get_id_to_bolt_agg_stats().isEmpty()) {
             Map<String, Bolt> bolts = topology.get_bolts();
-            for (Entry<String, Bolt> entry : bolts.entrySet()) {
-                if (Utils.isSystemId(entry.getKey())) {
+            for (String boltName : bolts.keySet()) {
+                if (!includeSys && Utils.isSystemId(boltName) || 
boltName.equals("__system")) {
 
 Review comment:
   When not using placeholder components, there's some filtering on the 
**__system** bolt that suppresses it's displaying even when the "Show System 
Stats" option is selected.
   
   The check for __system is trying to keep the placeholder and non-placeholder 
output in sync.
   
   I can remove the check if it's decided that's a cleaner way to go.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to