org.apache.hadoop.hbase.master
Class TimeToLiveLogCleaner
java.lang.Object
org.apache.hadoop.hbase.master.TimeToLiveLogCleaner
- All Implemented Interfaces:
- org.apache.hadoop.conf.Configurable, LogCleanerDelegate, Stoppable
public class TimeToLiveLogCleaner
- extends Object
- implements LogCleanerDelegate
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 |
org.apache.hadoop.conf.Configuration |
getConf()
|
boolean |
isLogDeletable(org.apache.hadoop.fs.Path filePath)
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 |
TimeToLiveLogCleaner
public TimeToLiveLogCleaner()
isLogDeletable
public boolean isLogDeletable(org.apache.hadoop.fs.Path filePath)
- Description copied from interface:
LogCleanerDelegate
- Should the master delete the log or keep it?
- Specified by:
isLogDeletable
in interface LogCleanerDelegate
- Parameters:
filePath
- full path to log.
- Returns:
- true if the log is deletable, false if not
setConf
public void setConf(org.apache.hadoop.conf.Configuration conf)
- Specified by:
setConf
in interface org.apache.hadoop.conf.Configurable
getConf
public org.apache.hadoop.conf.Configuration getConf()
- Specified by:
getConf
in interface org.apache.hadoop.conf.Configurable
stop
public void stop(String why)
- Description copied from interface:
Stoppable
- Stop this service.
- Specified by:
stop
in interface Stoppable
- Parameters:
why
- Why we're stopping.
isStopped
public boolean isStopped()
- Specified by:
isStopped
in interface Stoppable
- Returns:
- True if
Stoppable.stop(String)
has been closed.
Copyright © 2011 The Apache Software Foundation. All Rights Reserved.