org.apache.hadoop.hbase.master.cleaner
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
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).
Method Summary |
Iterable<org.apache.hadoop.fs.FileStatus> |
getDeletableFiles(Iterable<org.apache.hadoop.fs.FileStatus> files)
Determines which of the given files are safe to delete |
protected abstract boolean |
isFileDeletable(org.apache.hadoop.fs.FileStatus fStat)
Should the master delete the file or keep it? |
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 |
BaseFileCleanerDelegate
public BaseFileCleanerDelegate()
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
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
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.