Class KillSupervisorsCustomDuty
- java.lang.Object
-
- org.apache.druid.server.coordinator.duty.MetadataCleanupDuty
-
- org.apache.druid.server.coordinator.duty.KillSupervisorsCustomDuty
-
- All Implemented Interfaces:
CoordinatorCustomDuty,CoordinatorDuty
public class KillSupervisorsCustomDuty extends MetadataCleanupDuty implements CoordinatorCustomDuty
ExampleCoordinatorCustomDutyfor automatic deletion of terminated supervisors from the metadata storage. This duty has the same implementation asKillSupervisorsbut uses a different configuration style as detailed inCoordinatorCustomDuty.This duty is only an example to demostrate the usage of coordinator custom duties. All production clusters should continue using
KillSupervisors.In the future, we might migrate all metadata management coordinator duties to
CoordinatorCustomDutybut until then this class will remain undocumented.
-
-
Constructor Summary
Constructors Constructor Description KillSupervisorsCustomDuty(org.joda.time.Duration retainDuration, MetadataSupervisorManager metadataSupervisorManager, DruidCoordinatorConfig coordinatorConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intcleanupEntriesCreatedBefore(org.joda.time.DateTime minCreatedTime)Cleans up metadata entries created before theminCreatedTime.-
Methods inherited from class org.apache.druid.server.coordinator.duty.MetadataCleanupDuty
run
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.druid.server.coordinator.duty.CoordinatorDuty
run
-
-
-
-
Constructor Detail
-
KillSupervisorsCustomDuty
public KillSupervisorsCustomDuty(org.joda.time.Duration retainDuration, MetadataSupervisorManager metadataSupervisorManager, DruidCoordinatorConfig coordinatorConfig)
-
-
Method Detail
-
cleanupEntriesCreatedBefore
protected int cleanupEntriesCreatedBefore(org.joda.time.DateTime minCreatedTime)
Description copied from class:MetadataCleanupDutyCleans up metadata entries created before theminCreatedTime.This method is not invoked if the
MetadataCleanupDuty.cleanupPeriodhas not elapsed since theMetadataCleanupDuty.lastCleanupTime.- Specified by:
cleanupEntriesCreatedBeforein classMetadataCleanupDuty- Returns:
- Number of deleted metadata entries
-
-