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

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.BaseLogCleanerDelegate
              extended by org.apache.hadoop.hbase.master.cleaner.TimeToLiveLogCleaner
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, FileCleanerDelegate, Stoppable

@InterfaceAudience.Private
public class TimeToLiveLogCleaner
extends BaseLogCleanerDelegate

Log cleaner that uses the timestamp of the hlog to determine if it should be deleted. By default they are allowed to live for 10 minutes.


Constructor Summary
TimeToLiveLogCleaner()
           
 
Method Summary
 boolean isLogDeletable(org.apache.hadoop.fs.FileStatus fStat)
          Should the master delete the log or keep it?
 boolean isStopped()
           
 void setConf(org.apache.hadoop.conf.Configuration conf)
           
 void stop(String why)
          Stop this service.
 
Methods inherited from class org.apache.hadoop.hbase.master.cleaner.BaseLogCleanerDelegate
isFileDeletable
 
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

TimeToLiveLogCleaner

public TimeToLiveLogCleaner()
Method Detail

isLogDeletable

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

Implementing classes should override BaseLogCleanerDelegate.isFileDeletable(FileStatus) instead.

Overrides:
isLogDeletable in class BaseLogCleanerDelegate
Parameters:
fStat - file status of the file
Returns:
true if the log is deletable, false (default) if not

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

stop

public void stop(String why)
Description copied from interface: Stoppable
Stop this service.

Parameters:
why - Why we're stopping.

isStopped

public boolean isStopped()
Returns:
True if Stoppable.stop(String) has been closed.


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.