org.apache.hadoop.hbase.master.cleaner
Class BaseFileCleanerDelegate

java.lang.Object
  extended by org.apache.hadoop.hbase.BaseConfigurable
      extended by 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).


Constructor Summary
BaseFileCleanerDelegate()
           
 
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 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.Stoppable
isStopped, stop
 

Constructor Detail

BaseFileCleanerDelegate

public BaseFileCleanerDelegate()
Method Detail

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 © 2007–2016 The Apache Software Foundation. All rights reserved.