Class BaseLogCleanerDelegate

All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, FileCleanerDelegate, Stoppable
Direct Known Subclasses:
BackupLogCleaner, BaseTimeToLiveFileCleaner, ReplicationLogCleaner

@Private public abstract class BaseLogCleanerDelegate extends BaseFileCleanerDelegate
Base class for the log cleaning function inside the master. By default, three cleaners: TimeToLiveLogCleaner, TimeToLiveProcedureWALCleaner and ReplicationLogCleaner are called in order. So if other effects are needed, implement your own LogCleanerDelegate and add it to the configuration "hbase.master.logcleaner.plugins", which is a comma-separated list of fully qualified class names. LogsCleaner will add it to the chain.

HBase ships with LogsCleaner as the default implementation.

This interface extends Configurable, so setConf needs to be called once before using the cleaner. Since LogCleanerDelegates are created in LogsCleaner by reflection. Classes that implements this interface should provide a default constructor.

  • 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