Class PriorityBasedCompactionSegmentIterator
java.lang.Object
org.apache.druid.server.compaction.PriorityBasedCompactionSegmentIterator
- All Implemented Interfaces:
Iterator<CompactionCandidate>,CompactionSegmentIterator
public class PriorityBasedCompactionSegmentIterator
extends Object
implements CompactionSegmentIterator
Implementation of
CompactionSegmentIterator that returns candidate
segments in order of their priority.-
Constructor Summary
ConstructorsConstructorDescriptionPriorityBasedCompactionSegmentIterator(CompactionCandidateSearchPolicy searchPolicy, Map<String, DataSourceCompactionConfig> compactionConfigs, Map<String, SegmentTimeline> datasourceToTimeline, Map<String, List<org.joda.time.Interval>> skipIntervals, CompactionStatusTracker statusTracker) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
PriorityBasedCompactionSegmentIterator
public PriorityBasedCompactionSegmentIterator(CompactionCandidateSearchPolicy searchPolicy, Map<String, DataSourceCompactionConfig> compactionConfigs, Map<String, SegmentTimeline> datasourceToTimeline, Map<String, List<org.joda.time.Interval>> skipIntervals, CompactionStatusTracker statusTracker)
-
-
Method Details
-
getCompactedSegments
Description copied from interface:CompactionSegmentIteratorList of candidate segments that are already compacted and do not need to be compacted again. None of these segments are returned byIterator.next().- Specified by:
getCompactedSegmentsin interfaceCompactionSegmentIterator
-
getSkippedSegments
Description copied from interface:CompactionSegmentIteratorList of candidate segments that have been skipped for compaction as they cannot be compacted due to some reason. None of these segments are returned byIterator.next().- Specified by:
getSkippedSegmentsin interfaceCompactionSegmentIterator
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceIterator<CompactionCandidate>
-
next
- Specified by:
nextin interfaceIterator<CompactionCandidate>
-