You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/09/24 03:29:24 UTC

[GitHub] [druid] clintropolis commented on a change in pull request #11732: Add Broker config `druid.broker.segment.watchRealtimeNodes`

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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org