org.apache.hadoop.hbase.replication.master
Class ReplicationLogCleaner

java.lang.Object
  extended by org.apache.hadoop.hbase.replication.master.ReplicationLogCleaner
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, Abortable, LogCleanerDelegate, Stoppable

public class ReplicationLogCleaner
extends Object
implements LogCleanerDelegate, Abortable

Implementation of a log cleaner that checks if a log is still scheduled for replication before deleting it when its TTL is over.


Constructor Summary
ReplicationLogCleaner()
          Instantiates the cleaner, does nothing more.
 
Method Summary
 void abort(String why, Throwable e)
          Abort the server or client.
 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
 

Constructor Detail

ReplicationLogCleaner

public ReplicationLogCleaner()
Instantiates the cleaner, does nothing more.

Method Detail

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.

abort

public void abort(String why,
                  Throwable e)
Description copied from interface: Abortable
Abort the server or client.

Specified by:
abort in interface Abortable
Parameters:
why - Why we're aborting.
e - Throwable that caused abort. Can be null.


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