org.apache.hadoop.hbase.master.cleaner
Class BaseLogCleanerDelegate

java.lang.Object
  extended by org.apache.hadoop.hbase.BaseConfigurable
      extended by org.apache.hadoop.hbase.master.cleaner.BaseLogCleanerDelegate
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, FileCleanerDelegate, Stoppable
Direct Known Subclasses:
ReplicationLogCleaner, TimeToLiveLogCleaner

@InterfaceAudience.Private
public abstract class BaseLogCleanerDelegate
extends BaseConfigurable
implements FileCleanerDelegate

Base class for the log cleaning function inside the master. By default, two cleaners: TimeToLiveLogCleaner and ReplicationLogCleaner are called in order. So if other effects are needed, implement your own LogCleanerDelegate and add it to the configuration "hbase.master.logcleaner.plugins", which is a comma-separated list of fully qualified class names. LogsCleaner will add it to the chain.

HBase ships with LogsCleaner as the default implementation.

This interface extends Configurable, so setConf needs to be called once before using the cleaner. Since LogCleanerDelegates are created in LogsCleaner by reflection. Classes that implements this interface should provide a default constructor.


Constructor Summary
BaseLogCleanerDelegate()
           
 
Method Summary
 boolean isFileDeletable(org.apache.hadoop.fs.Path file)
          Should the master delete the file or keep it?
abstract  boolean isLogDeletable(org.apache.hadoop.fs.Path filePath)
          Deprecated. 
 
Methods inherited from class org.apache.hadoop.hbase.BaseConfigurable
getConf, setConf
 
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, setConf
 
Methods inherited from interface org.apache.hadoop.hbase.Stoppable
isStopped, stop
 

Constructor Detail

BaseLogCleanerDelegate

public BaseLogCleanerDelegate()
Method Detail

isFileDeletable

public boolean isFileDeletable(org.apache.hadoop.fs.Path file)
Description copied from interface: FileCleanerDelegate
Should the master delete the file or keep it?

Specified by:
isFileDeletable in interface FileCleanerDelegate
Parameters:
file - full path to the file to check
Returns:
true if the file is deletable, false if not

isLogDeletable

@Deprecated
public abstract boolean isLogDeletable(org.apache.hadoop.fs.Path filePath)
Deprecated. 

Should the master delete the log or keep it?

Implementing classes should override isFileDeletable(Path) instead.

Parameters:
filePath - full path to log.
Returns:
true if the log is deletable, false if not


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