surekhasaharan commented on issue #7571: Optimize coordinator API to retrieve segments with overshadowed status URL: https://github.com/apache/incubator-druid/issues/7571#issuecomment-488137427 @leventov I have some follow-up question on the suggested design. > isOvershadowed becomes a non-final field of DataSegment So are we saying make `DataSegment` mutable and add a setter for `overshadowed` field ? > Add interface SegmentsAccess { ImmutableDruidDataSource prepare(String dataSource); Iterable<DataSegment> iterateAll(); } (strawman naming) What is the purpose of this interface, who would implement this ? Are you thinking `SQLMetadataSegmentManager` implements this ? >Add DataSourceAccess computeOvershadowed() method to SQLSegmentMetadataManager, What is `DataSourceAccess` here ? Did you mean `SQLMetadataSegmentManager` ? > Both endpoints in MetadataResource and Coordination balancing logic (which currently computes isOvershadowed status on its own, too) use this API. which API ? `MetadataSegmentManager` already has `Iterable<DataSegment> iterateAllSegments();`, what if this returns `DataSegment` with `isOvershadowed` field set, which can be set in `SQLMetadataSegmentManager` poll method. >On the side of MetadataSegmentView, maintain something like a Map<DataSegment, DataSegment> and update overshadowed status like map.get(segmentFromCoordinator).setOvershadowed(segmentFromCoordinator.isOvershadowed()) I think this will not be required, if coordinator API already returns `DataSegment` which has overshadowed status.
---------------------------------------------------------------- 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
