Ethanlm 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_r285672137
 
 

 ##########
 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:
   `Constants.SYSTEM_COMPONENT_ID` Is better than `__system`

----------------------------------------------------------------
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