Class BaseTimeToLiveFileCleaner

All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, FileCleanerDelegate, Stoppable
Direct Known Subclasses:
TimeToLiveHFileCleaner, TimeToLiveLogCleaner, TimeToLiveMasterLocalStoreHFileCleaner, TimeToLiveMasterLocalStoreWALCleaner, TimeToLiveProcedureWALCleaner

@Private public abstract class BaseTimeToLiveFileCleaner extends BaseLogCleanerDelegate
Base class for time to live file cleaner.
  • Field Details

  • Constructor Details

  • Method Details

    • setConf

      public final void setConf(org.apache.hadoop.conf.Configuration conf)
      Specified by:
      setConf in interface org.apache.hadoop.conf.Configurable
      Overrides:
      setConf in class BaseConfigurable
    • isFileDeletable

      public boolean isFileDeletable(org.apache.hadoop.fs.FileStatus status)
      Description copied from class: BaseFileCleanerDelegate
      Should the master delete the file or keep it?
      Overrides:
      isFileDeletable in class BaseLogCleanerDelegate
      Parameters:
      status - file status of the file to check
      Returns:
      true if the file is deletable, false if not
    • stop

      public void stop(String why)
      Description copied from interface: Stoppable
      Stop this service. Implementers should favor logging errors over throwing RuntimeExceptions.
      Parameters:
      why - Why we're stopping.
    • isStopped

      public boolean isStopped()
      Description copied from interface: Stoppable
      Returns True if Stoppable.stop(String) has been closed.
    • getTtlMs

      protected abstract long getTtlMs(org.apache.hadoop.conf.Configuration conf)
    • valiateFilename

      protected abstract boolean valiateFilename(org.apache.hadoop.fs.Path file)