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
-
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 deletevoid
this method is used to pass some instance into subclassprotected abstract boolean
isFileDeletable
(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, setConf
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
Methods 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:FileCleanerDelegate
Determines which of the given files are safe to delete- Specified by:
getDeletableFiles
in interfaceFileCleanerDelegate
- Parameters:
files
- files to check for deletion- Returns:
- files that are ok to delete according to this cleaner
-
init
Description copied from interface:FileCleanerDelegate
this method is used to pass some instance into subclass- Specified by:
init
in 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
-