abhishekagarwal87 commented on a change in pull request #11732:
URL: https://github.com/apache/druid/pull/11732#discussion_r715335385
##########
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:
we should also add a warning in the code. does calling
`isSegmentReplicationTarget()` makes more sense than checking the server type?
--
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]