Interface FileCleanerDelegate

All Superinterfaces:
org.apache.hadoop.conf.Configurable, Stoppable
All Known Implementing Classes:
BackupHFileCleaner, BackupLogCleaner, BaseFileCleanerDelegate, BaseHFileCleanerDelegate, BaseLogCleanerDelegate, BaseTimeToLiveFileCleaner, HFileLinkCleaner, LongTermArchivingHFileCleaner, ManualMobMaintHFileCleaner, ReplicationHFileCleaner, ReplicationLogCleaner, SnapshotHFileCleaner, SnapshotScannerHDFSAclCleaner, TimeToLiveHFileCleaner, TimeToLiveLogCleaner, TimeToLiveMasterLocalStoreHFileCleaner, TimeToLiveMasterLocalStoreWALCleaner, TimeToLiveProcedureWALCleaner

@Private public interface FileCleanerDelegate extends org.apache.hadoop.conf.Configurable, Stoppable
General interface for cleaning files from a folder (generally an archive or backup folder). These are chained via the CleanerChore to determine if a given file should be deleted.
  • Method Summary

    Modifier and Type
    Method
    Description
    Iterable<org.apache.hadoop.fs.FileStatus>
    getDeletableFiles(Iterable<org.apache.hadoop.fs.FileStatus> files)
    Determines which of the given files are safe to delete
    void
    init(Map<String,Object> params)
    this method is used to pass some instance into subclass
    default boolean
    isEmptyDirDeletable(org.apache.hadoop.fs.Path dir)
    Check if a empty directory with no subdirs or subfiles can be deleted
    default void
    Will be called after cleaner run.
    default void
    Used to do some initialize work before every period clean

    Methods inherited from interface org.apache.hadoop.conf.Configurable

    getConf, setConf

    Methods inherited from interface org.apache.hadoop.hbase.Stoppable

    isStopped, stop
  • Method Details

    • getDeletableFiles

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

      void init(Map<String,Object> params)
      this method is used to pass some instance into subclass
    • preClean

      default void preClean()
      Used to do some initialize work before every period clean
    • postClean

      default void postClean()
      Will be called after cleaner run.
    • isEmptyDirDeletable

      default boolean isEmptyDirDeletable(org.apache.hadoop.fs.Path dir)
      Check if a empty directory with no subdirs or subfiles can be deleted
      Parameters:
      dir - Path of the directory
      Returns:
      True if the directory can be deleted, otherwise false