Class KillUnusedSegments

  • All Implemented Interfaces:
    CoordinatorDuty

    public class KillUnusedSegments
    extends Object
    implements CoordinatorDuty

    Completely removes information about unused segments who have an interval end that comes before now - durationToRetain from the metadata store. durationToRetain can be a positive or negative duration, negative meaning the interval end target will be in the future. Also, durationToRetain can be ignored if ignoreDurationToRetain is enabled, meaning that there is no upper bound to the end interval of segments that will be killed. The umbrella interval of the unused segments per datasource to be killed is determined by findIntervalForKill(String, DateTime), which takes into account the configured bufferPeriod. However, the kill task needs to check again for max bufferPeriod for the unused segments in the widened interval as there can be multiple unused segments with different used_status_last_updated time.

    See org.apache.druid.indexing.common.task.KillUnusedSegmentsTask.

    • Field Detail

      • IS_AUTO_KILL_TASK

        public static final com.google.common.base.Predicate<org.apache.druid.indexer.TaskStatusPlus> IS_AUTO_KILL_TASK
    • Method Detail

      • run

        public DruidCoordinatorRuntimeParams run​(DruidCoordinatorRuntimeParams params)
        Description copied from interface: CoordinatorDuty
        Implementations 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:
        run in interface CoordinatorDuty
        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.