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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionIterable<org.apache.hadoop.fs.FileStatus>getDeletableFiles(Iterable<org.apache.hadoop.fs.FileStatus> files) Determines which of the given files are safe to deletevoidthis method is used to pass some instance into subclassprotected abstract booleanisFileDeletable(org.apache.hadoop.fs.FileStatus fStat) Should the master delete the file or keep it?Methods inherited from class org.apache.hadoop.hbase.BaseConfigurable
getConf, setConfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConfMethods inherited from interface org.apache.hadoop.hbase.master.cleaner.FileCleanerDelegate
isEmptyDirDeletable, postClean, preClean
-
Constructor Details
-
BaseFileCleanerDelegate
public BaseFileCleanerDelegate()
-
-
Method Details
-
getDeletableFiles
public Iterable<org.apache.hadoop.fs.FileStatus> getDeletableFiles(Iterable<org.apache.hadoop.fs.FileStatus> files) Description copied from interface:FileCleanerDelegateDetermines which of the given files are safe to delete- Specified by:
getDeletableFilesin interfaceFileCleanerDelegate- Parameters:
files- files to check for deletion- Returns:
- files that are ok to delete according to this cleaner
-
init
Description copied from interface:FileCleanerDelegatethis method is used to pass some instance into subclass- Specified by:
initin interfaceFileCleanerDelegate
-
isFileDeletable
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
-