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

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

public class ReplicationLogCleaner
extends BaseLogCleanerDelegate
implements 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.
 Iterable<org.apache.hadoop.fs.FileStatus> getDeletableFiles(Iterable<org.apache.hadoop.fs.FileStatus> files)
          Determines which of the given files are safe to delete
 boolean isAborted()
          Check if the server or client was aborted.
 boolean isStopped()
           
 void setConf(org.apache.hadoop.conf.Configuration config)
           
 void stop(String why)
          Stop this service.
 
Methods inherited from class org.apache.hadoop.hbase.master.cleaner.BaseLogCleanerDelegate
isFileDeletable, isLogDeletable
 
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

ReplicationLogCleaner

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

Method Detail

getDeletableFiles

public Iterable<org.apache.hadoop.fs.FileStatus> getDeletableFiles(Iterable<org.apache.hadoop.fs.FileStatus> files)
Description copied from interface: FileCleanerDelegate
Determines which of the given files are safe to delete

Specified by:
getDeletableFiles in interface FileCleanerDelegate
Overrides:
getDeletableFiles in class BaseFileCleanerDelegate
Parameters:
files - files to check for deletion
Returns:
files that are ok to delete according to this cleaner

setConf

public void setConf(org.apache.hadoop.conf.Configuration config)
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.

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.

isAborted

public boolean isAborted()
Description copied from interface: Abortable
Check if the server or client was aborted.

Specified by:
isAborted in interface Abortable
Returns:
true if the server or client was aborted, false otherwise


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