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



##########
File path: 
server/src/main/java/org/apache/druid/client/BrokerSegmentWatcherConfig.java
##########
@@ -46,6 +49,11 @@
     return watchedDataSources;
   }
 
+  public boolean isWatchRealtimeNodes()
+  {
+    return watchRealtimeNodes;
+  }

Review comment:
       I think my only real question about this PR is if this should maybe be 
`watchedServerTypes` or something and take a list of server types to watch 
instead of just a boolean

##########
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:
       This should be looking for `INDEXER_EXECUTOR`, not sure `REALTIME` is 
actually used anymore (it was for old realtime nodes I think)




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