Class KillDatasourceMetadata
java.lang.Object
org.apache.druid.server.coordinator.duty.MetadataCleanupDuty
org.apache.druid.server.coordinator.duty.KillDatasourceMetadata
- All Implemented Interfaces:
CoordinatorDuty
CoordinatorDuty for automatic deletion of datasource metadata from the datasource table in metadata storage.
(Note: datasource metadata only exists for datasource created from supervisor).
Note that this class relies on the supervisorSpec.getDataSources names to match with the
'datasource' column of the datasource metadata table.
-
Constructor Summary
ConstructorsConstructorDescriptionKillDatasourceMetadata(MetadataCleanupConfig config, IndexerMetadataStorageCoordinator indexerMetadataStorageCoordinator, MetadataSupervisorManager metadataSupervisorManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected intcleanupEntriesCreatedBefore(org.joda.time.DateTime minCreatedTime) Cleans up metadata entries created before theminCreatedTime.Methods inherited from class org.apache.druid.server.coordinator.duty.MetadataCleanupDuty
getCurrentTime, run
-
Constructor Details
-
KillDatasourceMetadata
public KillDatasourceMetadata(MetadataCleanupConfig config, IndexerMetadataStorageCoordinator indexerMetadataStorageCoordinator, MetadataSupervisorManager metadataSupervisorManager)
-
-
Method Details
-
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
cleanupPeriodhas not elapsed since theMetadataCleanupDuty.lastCleanupTime.- Specified by:
cleanupEntriesCreatedBeforein classMetadataCleanupDuty- Returns:
- Number of deleted metadata entries
-