org.apache.hadoop.hbase.backup.example
Class LongTermArchivingHFileCleaner

java.lang.Object
  extended by org.apache.hadoop.hbase.BaseConfigurable
      extended by org.apache.hadoop.hbase.master.cleaner.BaseFileCleanerDelegate
          extended by org.apache.hadoop.hbase.master.cleaner.BaseHFileCleanerDelegate
              extended by org.apache.hadoop.hbase.backup.example.LongTermArchivingHFileCleaner
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, FileCleanerDelegate, Stoppable

@InterfaceAudience.LimitedPrivate(value="Configuration")
public class LongTermArchivingHFileCleaner
extends BaseHFileCleanerDelegate

BaseHFileCleanerDelegate that only cleans HFiles that don't belong to a table that is currently being archived.

This only works properly if the TimeToLiveHFileCleaner is also enabled (it always should be), since it may take a little time for the ZK notification to propagate, in which case we may accidentally delete some files.


Constructor Summary
LongTermArchivingHFileCleaner()
           
 
Method Summary
 boolean isFileDeletable(org.apache.hadoop.fs.FileStatus fStat)
          Should the master delete the file or keep it?
 void setConf(org.apache.hadoop.conf.Configuration config)
           
 void stop(String reason)
           
 
Methods inherited from class org.apache.hadoop.hbase.master.cleaner.BaseHFileCleanerDelegate
isStopped
 
Methods inherited from class org.apache.hadoop.hbase.master.cleaner.BaseFileCleanerDelegate
getDeletableFiles
 
Methods inherited from class org.apache.hadoop.hbase.BaseConfigurable
getConf
 
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
 

Constructor Detail

LongTermArchivingHFileCleaner

public LongTermArchivingHFileCleaner()
Method Detail

isFileDeletable

public boolean isFileDeletable(org.apache.hadoop.fs.FileStatus fStat)
Description copied from class: BaseFileCleanerDelegate
Should the master delete the file or keep it?

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

setConf

public void setConf(org.apache.hadoop.conf.Configuration config)
Specified by:
setConf in interface org.apache.hadoop.conf.Configurable
Overrides:
setConf in class BaseConfigurable

stop

public void stop(String reason)
Specified by:
stop in interface Stoppable
Overrides:
stop in class BaseHFileCleanerDelegate


Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.