Class CompactionCandidate

java.lang.Object
org.apache.druid.server.compaction.CompactionCandidate

public class CompactionCandidate extends Object
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 Details

    • from

      public static CompactionCandidate from(List<DataSegment> segments)
    • getSegments

      public List<DataSegment> getSegments()
      Returns:
      Non-empty list of segments that make up this candidate.
    • getTotalBytes

      public long getTotalBytes()
    • 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.
    • getDataSource

      public String getDataSource()
    • getStats

      public CompactionStatistics getStats()
    • getCurrentStatus

      @Nullable public CompactionStatus getCurrentStatus()
      Current compaction status of the time chunk corresponding to this candidate.
    • withCurrentStatus

      public CompactionCandidate withCurrentStatus(CompactionStatus status)
      Creates a copy of this CompactionCandidate object with the given status.
    • toString

      public String toString()
      Overrides:
      toString in class Object