Interface DatasourceSegmentMetadataReader
- All Known Subinterfaces:
DatasourceSegmentCache,SegmentMetadataReadTransaction,SegmentMetadataTransaction
- All Known Implementing Classes:
ReadWriteCache
public interface DatasourceSegmentMetadataReader
Performs read operations on the segment metadata for a single datasource.
-
Method Summary
Modifier and TypeMethodDescriptionfindExistingSegmentIds(Set<SegmentId> segments) Retrieves the IDs of segments (out of the given set) which already exist in the metadata store.findHighestUnusedSegmentId(org.joda.time.Interval interval, String version) Retrieves the ID of the unused segment that has the highest partition number amongst all unused segments that exactly match the given interval and version.findPendingSegmentIds(String sequenceName, String sequencePreviousId) Retrieves pending segment IDs for the given sequence name and previous ID.findPendingSegmentIdsWithExactInterval(String sequenceName, org.joda.time.Interval interval) Retrieves pending segment IDs that exactly match the given interval and sequence name.findPendingSegments(String taskAllocatorId) Retrieves pending segments that were allocated for the specifiedtaskAllocatorId.findPendingSegmentsOverlapping(org.joda.time.Interval interval) Retrieves pending segments overlapping the given interval.findPendingSegmentsWithExactInterval(org.joda.time.Interval interval) Retrieves pending segments whose interval exactly aligns with the given interval.findSegment(SegmentId segmentId) Retrieves the segment for the given segment ID.findSegments(Set<SegmentId> segmentIds) Retrieves segments for the given segment IDs.findSegmentsWithSchema(Set<SegmentId> segmentIds) Retrieves segments with additional metadata info such as number of rows and schema fingerprint for the given segment IDs.findUnusedSegments(org.joda.time.Interval interval, List<String> versions, Integer limit, org.joda.time.DateTime maxUpdatedTime) Retrieves unused segments that are fully contained within the given interval.findUsedSegment(SegmentId segmentId) Retrieves the used segment for the given segment ID.findUsedSegmentIdsOverlapping(org.joda.time.Interval interval) Retrieves IDs of used segments that belong to the datasource and overlap the given interval.findUsedSegments(Set<SegmentId> segmentIds) Retrieves used segments for the given segment IDs.findUsedSegmentsOverlappingAnyOf(List<org.joda.time.Interval> intervals) Retrieves used segments that overlap with any of the given intervals.findUsedSegmentsPlusOverlappingAnyOf(List<org.joda.time.Interval> intervals) Retrieves used segments that overlap with any of the given intervals.
-
Method Details
-
findExistingSegmentIds
Retrieves the IDs of segments (out of the given set) which already exist in the metadata store. -
findUsedSegmentIdsOverlapping
Retrieves IDs of used segments that belong to the datasource and overlap the given interval. -
findHighestUnusedSegmentId
Retrieves the ID of the unused segment that has the highest partition number amongst all unused segments that exactly match the given interval and version. -
findUsedSegmentsOverlappingAnyOf
Retrieves used segments that overlap with any of the given intervals. If the given list of intervals is empty, all used segments are included in the result. -
findUsedSegments
Retrieves used segments for the given segment IDs. -
findUsedSegmentsPlusOverlappingAnyOf
Retrieves used segments that overlap with any of the given intervals. If the given list of intervals is empty, all used segments are included in the result. -
findSegment
Retrieves the segment for the given segment ID.- Returns:
- null if no such segment exists in the metadata store.
-
findUsedSegment
Retrieves the used segment for the given segment ID.- Returns:
- null if no such segment exists in the metadata store.
-
findSegments
Retrieves segments for the given segment IDs. -
findSegmentsWithSchema
Retrieves segments with additional metadata info such as number of rows and schema fingerprint for the given segment IDs. -
findUnusedSegments
List<DataSegment> findUnusedSegments(org.joda.time.Interval interval, @Nullable List<String> versions, @Nullable Integer limit, @Nullable org.joda.time.DateTime maxUpdatedTime) Retrieves unused segments that are fully contained within the given interval.- Parameters:
interval- Returned segments must be fully contained within this intervalversions- Optional list of segment versions. If passed as null, all segment versions are eligible.limit- Maximum number of segments to return. If passed as null, all segments are returned.maxUpdatedTime- Returned segments must have aused_status_last_updatedwhich is either null or earlier than this value.
-
findPendingSegmentIds
Retrieves pending segment IDs for the given sequence name and previous ID. -
findPendingSegmentIdsWithExactInterval
List<SegmentIdWithShardSpec> findPendingSegmentIdsWithExactInterval(String sequenceName, org.joda.time.Interval interval) Retrieves pending segment IDs that exactly match the given interval and sequence name. -
findPendingSegmentsOverlapping
Retrieves pending segments overlapping the given interval. -
findPendingSegmentsWithExactInterval
Retrieves pending segments whose interval exactly aligns with the given interval. -
findPendingSegments
Retrieves pending segments that were allocated for the specifiedtaskAllocatorId.
-