org.apache.hadoop.hbase.master.cleaner
Class TimeToLiveLogCleaner
java.lang.Object
org.apache.hadoop.hbase.BaseConfigurable
org.apache.hadoop.hbase.master.cleaner.BaseFileCleanerDelegate
org.apache.hadoop.hbase.master.cleaner.BaseLogCleanerDelegate
org.apache.hadoop.hbase.master.cleaner.TimeToLiveLogCleaner
- All Implemented Interfaces:
- org.apache.hadoop.conf.Configurable, FileCleanerDelegate, Stoppable
@InterfaceAudience.LimitedPrivate(value="Configuration")
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.
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.hadoop.conf.Configurable |
getConf |
TimeToLiveLogCleaner
public TimeToLiveLogCleaner()
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 © 2007–2016 The Apache Software Foundation. All rights reserved.