Class MetadataStoreBasedUsedSegmentsRetriever

    • Constructor Detail

      • MetadataStoreBasedUsedSegmentsRetriever

        @Inject
        public MetadataStoreBasedUsedSegmentsRetriever​(org.apache.druid.indexing.overlord.IndexerMetadataStorageCoordinator indexerMetadataStorageCoordinator)
    • Method Detail

      • retrieveUsedSegmentsForIntervals

        public Collection<org.apache.druid.timeline.DataSegment> retrieveUsedSegmentsForIntervals​(String dataSource,
                                                                                                  List<org.joda.time.Interval> intervals,
                                                                                                  org.apache.druid.indexing.overlord.Segments visibility)
        Description copied from interface: UsedSegmentsRetriever
        Retrieve (potentially, from a remote node) all segments which may include any data in the interval and are marked as used. The order of segments within the returned collection is unspecified, but each segment is guaranteed to appear in the collection only once.
        Specified by:
        retrieveUsedSegmentsForIntervals in interface UsedSegmentsRetriever
        Parameters:
        dataSource - The datasource to query
        intervals - The intervals for which used segments are to be returned
        visibility - Whether only visible or visible as well as overshadowed segments should be returned. The visibility is considered within the specified intervals: that is, a segment which is visible outside of the specified intervals, but overshadowed on the specified intervals will not be returned if Segments.ONLY_VISIBLE is passed. See more precise description in the doc for Segments.
        Returns:
        The DataSegments which include data in the requested intervals. These segments may contain data outside the requested interval.