Class LongTermArchivingHFileCleaner

All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, FileCleanerDelegate, Stoppable

@LimitedPrivate("Configuration") public class LongTermArchivingHFileCleaner extends BaseHFileCleanerDelegate
BaseHFileCleanerDelegate that only cleans HFiles that don't belong to a table that is currently being archived.

This only works properly if the TimeToLiveHFileCleaner is also enabled (it always should be), since it may take a little time for the ZK notification to propagate, in which case we may accidentally delete some files.

  • Field Details

  • Constructor Details

  • Method Details

    • isFileDeletable

      public boolean isFileDeletable(org.apache.hadoop.fs.FileStatus fStat)
      Description copied from class: BaseFileCleanerDelegate
      Should the master delete the file or keep it?

      This method can be called concurrently by multiple threads. Implementations must be thread safe.

      Specified by:
      isFileDeletable in class BaseFileCleanerDelegate
      Parameters:
      fStat - file status of the file to check
      Returns:
      true if the file is deletable, false if not
    • setConf

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

      public void stop(String reason)
      Description copied from interface: Stoppable
      Stop this service. Implementers should favor logging errors over throwing RuntimeExceptions.
      Specified by:
      stop in interface Stoppable
      Overrides:
      stop in class BaseHFileCleanerDelegate
      Parameters:
      reason - Why we're stopping.