Class BaseFileCleanerDelegate

java.lang.Object
org.apache.hadoop.hbase.BaseConfigurable
org.apache.hadoop.hbase.master.cleaner.BaseFileCleanerDelegate
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, FileCleanerDelegate, Stoppable
Direct Known Subclasses:
BaseHFileCleanerDelegate, BaseLogCleanerDelegate

@Private public abstract class BaseFileCleanerDelegate extends BaseConfigurable implements FileCleanerDelegate
Base class for file cleaners which allows subclasses to implement a simple isFileDeletable method (which used to be the FileCleanerDelegate contract).
  • Constructor Details

  • Method Details

    • getDeletableFiles

      public Iterable<org.apache.hadoop.fs.FileStatus> getDeletableFiles(Iterable<org.apache.hadoop.fs.FileStatus> files)
      Description copied from interface: FileCleanerDelegate
      Determines which of the given files are safe to delete
      Specified by:
      getDeletableFiles in interface FileCleanerDelegate
      Parameters:
      files - files to check for deletion
      Returns:
      files that are ok to delete according to this cleaner
    • init

      public void init(Map<String,Object> params)
      Description copied from interface: FileCleanerDelegate
      this method is used to pass some instance into subclass
      Specified by:
      init in interface FileCleanerDelegate
    • isFileDeletable

      protected abstract boolean isFileDeletable(org.apache.hadoop.fs.FileStatus fStat)
      Should the master delete the file or keep it?
      Parameters:
      fStat - file status of the file to check
      Returns:
      true if the file is deletable, false if not