Class CompactSegments
- java.lang.Object
-
- org.apache.druid.server.coordinator.duty.CompactSegments
-
- All Implemented Interfaces:
CoordinatorCustomDuty,CoordinatorDuty
public class CompactSegments extends Object implements CoordinatorCustomDuty
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOMPACTION_TASK_TYPEMust be the same as org.apache.druid.indexing.common.task.CompactionTask.TYPE.static StringSTORE_COMPACTION_STATE_KEYMust be the same as org.apache.druid.indexing.common.task.Tasks.STORE_COMPACTION_STATE_KEY
-
Constructor Summary
Constructors Constructor Description CompactSegments(CompactionSegmentSearchPolicy policy, OverlordClient overlordClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,AutoCompactionSnapshot>getAutoCompactionSnapshot()AutoCompactionSnapshotgetAutoCompactionSnapshot(String dataSource)OverlordClientgetOverlordClient()LonggetTotalSizeOfSegmentsAwaitingCompaction(String dataSource)DruidCoordinatorRuntimeParamsrun(DruidCoordinatorRuntimeParams params)Implementations of this method run various activities performed by the coordinator.
-
-
-
Field Detail
-
COMPACTION_TASK_TYPE
public static final String COMPACTION_TASK_TYPE
Must be the same as org.apache.druid.indexing.common.task.CompactionTask.TYPE.- See Also:
- Constant Field Values
-
STORE_COMPACTION_STATE_KEY
public static final String STORE_COMPACTION_STATE_KEY
Must be the same as org.apache.druid.indexing.common.task.Tasks.STORE_COMPACTION_STATE_KEY- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CompactSegments
@Inject public CompactSegments(CompactionSegmentSearchPolicy policy, OverlordClient overlordClient)
-
-
Method Detail
-
getOverlordClient
public OverlordClient getOverlordClient()
-
run
public DruidCoordinatorRuntimeParams run(DruidCoordinatorRuntimeParams params)
Description copied from interface:CoordinatorDutyImplementations of this method run various activities performed by the coordinator. Input params can be used and modified. The returned DruidCoordinatorRuntimeParams is passed to the next duty.- Specified by:
runin interfaceCoordinatorDuty- Returns:
- same as input or a modified value to be used by next duty. Null return
values will prevent subsequent CoordinatorDuty objects (see the order in the lists passed into the constructor of
DruidCoordinator.DutiesRunnable) from running until the next cycle.
-
getTotalSizeOfSegmentsAwaitingCompaction
@Nullable public Long getTotalSizeOfSegmentsAwaitingCompaction(String dataSource)
-
getAutoCompactionSnapshot
@Nullable public AutoCompactionSnapshot getAutoCompactionSnapshot(String dataSource)
-
getAutoCompactionSnapshot
public Map<String,AutoCompactionSnapshot> getAutoCompactionSnapshot()
-
-