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

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.master.cleaner.TimeToLiveHFileCleaner
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, FileCleanerDelegate, Stoppable

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

HFile cleaner that uses the timestamp of the hfile to determine if it should be deleted. By default they are allowed to live for 300000L


Field Summary
static long DEFAULT_TTL
           
static org.apache.commons.logging.Log LOG
           
static String TTL_CONF_KEY
           
 
Constructor Summary
TimeToLiveHFileCleaner()
           
 
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 conf)
           
 
Methods inherited from class org.apache.hadoop.hbase.master.cleaner.BaseHFileCleanerDelegate
isStopped, stop
 
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
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG

TTL_CONF_KEY

public static final String TTL_CONF_KEY
See Also:
Constant Field Values

DEFAULT_TTL

public static final long DEFAULT_TTL
See Also:
Constant Field Values
Constructor Detail

TimeToLiveHFileCleaner

public TimeToLiveHFileCleaner()
Method Detail

setConf

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

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


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