Class CompactionCandidate
java.lang.Object
org.apache.druid.server.compaction.CompactionCandidate
Non-empty list of segments of a datasource being considered for compaction.
A candidate typically contains all the segments of a single time chunk.
-
Method Summary
Modifier and TypeMethodDescriptionstatic CompactionCandidatefrom(List<DataSegment> segments, Granularity targetSegmentGranularity, CompactionStatus currentStatus) org.joda.time.IntervalInterval aligned to the target segment granularity used for the compaction task.static org.joda.time.IntervalgetCompactionInterval(List<DataSegment> segments, Granularity targetSegmentGranularity) Non-null current compaction status of the time chunk corresponding to this candidate.getStats()org.joda.time.IntervalUmbrella interval of all the segments in this candidate.inttoString()withCurrentStatus(CompactionStatus status) Creates a copy of this CompactionCandidate object with the given status.
-
Method Details
-
getCompactionInterval
public static org.joda.time.Interval getCompactionInterval(List<DataSegment> segments, @Nullable Granularity targetSegmentGranularity) -
from
public static CompactionCandidate from(List<DataSegment> segments, @Nullable Granularity targetSegmentGranularity, CompactionStatus currentStatus) -
getSegments
- Returns:
- Non-empty list of segments that make up this candidate.
-
numSegments
public int numSegments() -
getUmbrellaInterval
public org.joda.time.Interval getUmbrellaInterval()Umbrella interval of all the segments in this candidate. This typically corresponds to a single time chunk in the segment timeline. -
getCompactionInterval
public org.joda.time.Interval getCompactionInterval()Interval aligned to the target segment granularity used for the compaction task. This interval completely contains theumbrellaInterval. -
getDataSource
-
getStats
-
getCompactedStats
-
getUncompactedStats
-
getUncompactedSegments
-
getCurrentStatus
Non-null current compaction status of the time chunk corresponding to this candidate. -
withCurrentStatus
Creates a copy of this CompactionCandidate object with the given status. -
toString
-