clintropolis commented on a change in pull request #11732:
URL: https://github.com/apache/druid/pull/11732#discussion_r715293995



##########
File path: server/src/main/java/org/apache/druid/client/BrokerServerView.java
##########
@@ -112,17 +112,21 @@ public BrokerServerView(
     this.timelines = new HashMap<>();
 
     this.segmentFilter = (Pair<DruidServerMetadata, DataSegment> 
metadataAndSegment) -> {
+      // Include only watched tiers if specified
       if (segmentWatcherConfig.getWatchedTiers() != null
           && 
!segmentWatcherConfig.getWatchedTiers().contains(metadataAndSegment.lhs.getTier()))
 {
         return false;
       }
 
+      // Include only watched datasources if specified
       if (segmentWatcherConfig.getWatchedDataSources() != null
           && 
!segmentWatcherConfig.getWatchedDataSources().contains(metadataAndSegment.rhs.getDataSource()))
 {
         return false;
       }
 
-      return true;
+      // Include realtime nodes only if they are watched
+      return segmentWatcherConfig.isWatchRealtimeNodes()
+          || metadataAndSegment.lhs.getType() != ServerType.REALTIME;

Review comment:
       yeah, looks like usages were removed in #7915 and just exists now for 
... reasons.




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to