HeartSaVioR 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_r285645847
##########
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:
Is your intention `(!includeSys && Utils.isSystemId(boltName)) ||
boltName.equals("__system"))`? Then let's add bracket there to clarify the
intention.
I'm not sure where you pointed out as `some filtering`, but now I think it
may be natural to filter out system bolts, as it runs per executor and the main
purpose for now is shipping metrics V1 which tracking these bolts may not give
meaningful value.
----------------------------------------------------------------
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