Package org.apache.druid.timeline
Class CompactionState
java.lang.Object
org.apache.druid.timeline.CompactionState
This class describes what compaction task spec was used to create a given segment.
The compaction task is a task that reads Druid segments and overwrites them with new ones. Since this task always
reads segments in the same order, the same task spec will always create the same set of segments
(not same segment ID, but same content).
Note that this class doesn't include all fields in the compaction task spec. Only the configurations that can
affect the content of segment should be included.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCompactionState(PartitionsSpec partitionsSpec, DimensionsSpec dimensionsSpec, List<AggregatorFactory> metricsSpec, CompactionTransformSpec transformSpec, IndexSpec indexSpec, GranularitySpec granularitySpec, List<AggregateProjectionSpec> projections) -
Method Summary
Modifier and TypeMethodDescriptionstatic Function<Set<DataSegment>, Set<DataSegment>> addCompactionStateToSegments(PartitionsSpec partitionsSpec, DimensionsSpec dimensionsSpec, List<AggregatorFactory> metricsSpec, CompactionTransformSpec transformSpec, IndexSpec indexSpec, GranularitySpec granularitySpec, List<AggregateProjectionSpec> projections) booleaninthashCode()toString()
-
Constructor Details
-
CompactionState
public CompactionState(PartitionsSpec partitionsSpec, DimensionsSpec dimensionsSpec, List<AggregatorFactory> metricsSpec, CompactionTransformSpec transformSpec, IndexSpec indexSpec, GranularitySpec granularitySpec, @Nullable List<AggregateProjectionSpec> projections)
-
-
Method Details
-
getPartitionsSpec
-
getDimensionsSpec
-
getMetricsSpec
-
getTransformSpec
-
getIndexSpec
-
getGranularitySpec
-
getProjections
-
equals
-
hashCode
public int hashCode() -
toString
-
addCompactionStateToSegments
public static Function<Set<DataSegment>,Set<DataSegment>> addCompactionStateToSegments(PartitionsSpec partitionsSpec, DimensionsSpec dimensionsSpec, List<AggregatorFactory> metricsSpec, CompactionTransformSpec transformSpec, IndexSpec indexSpec, GranularitySpec granularitySpec, @Nullable List<AggregateProjectionSpec> projections)
-