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, LogCleanerDelegate, org.apache.zookeeper.Watcher

public class ReplicationLogCleaner
extends Object
implements LogCleanerDelegate, org.apache.zookeeper.Watcher

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


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.zookeeper.Watcher
org.apache.zookeeper.Watcher.Event
 
Constructor Summary
ReplicationLogCleaner()
          Instantiates the cleaner, does nothing more.
 
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?
 void process(org.apache.zookeeper.WatchedEvent watchedEvent)
           
 void setConf(org.apache.hadoop.conf.Configuration conf)
           
 
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

process

public void process(org.apache.zookeeper.WatchedEvent watchedEvent)
Specified by:
process in interface org.apache.zookeeper.Watcher


Copyright © 2010 Apache Software Foundation. All Rights Reserved.