Class MetadataCleanupDuty

    • Constructor Detail

      • MetadataCleanupDuty

        protected MetadataCleanupDuty​(String entryType,
                                      String propertyPrefix,
                                      boolean cleanupEnabled,
                                      org.joda.time.Duration cleanupPeriod,
                                      org.joda.time.Duration retainDuration,
                                      CoordinatorStat cleanupCountStat,
                                      DruidCoordinatorConfig coordinatorConfig)
    • Method Detail

      • run

        @Nullable
        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.
      • cleanupEntriesCreatedBefore

        protected abstract int cleanupEntriesCreatedBefore​(org.joda.time.DateTime minCreatedTime)
        Cleans up metadata entries created before the minCreatedTime.

        This method is not invoked if the cleanupPeriod has not elapsed since the lastCleanupTime.

        Returns:
        Number of deleted metadata entries