org.apache.falcon.cleanup
Class AbstractCleanupHandler

java.lang.Object
  extended by org.apache.falcon.cleanup.AbstractCleanupHandler
Direct Known Subclasses:
FeedCleanupHandler, ProcessCleanupHandler

public abstract class AbstractCleanupHandler
extends Object

Falcon cleanup handler for cleaning up work, temp and log files left behind by falcon.


Field Summary
static ExpressionEvaluator EVALUATOR
           
protected static org.apache.log4j.Logger LOG
           
static ExpressionHelper RESOLVER
           
protected static ConfigurationStore STORE
           
 
Constructor Summary
AbstractCleanupHandler()
           
 
Method Summary
abstract  void cleanup()
           
protected  void delete(org.apache.falcon.entity.v0.cluster.Cluster cluster, Entity entity, long retention)
           
protected  void delete(org.apache.falcon.entity.v0.cluster.Cluster cluster, Entity entity, long retention, FileStatus[] logs)
           
protected  FileStatus[] getAllLogs(org.apache.falcon.entity.v0.cluster.Cluster cluster, Entity entity)
           
protected  String getCurrentColo()
           
protected  FileSystem getFileSystem(org.apache.falcon.entity.v0.cluster.Cluster cluster)
           
protected abstract  Path getLogPath(Entity entity, String stagingPath)
           
protected  long getRetention(Entity entity, Frequency.TimeUnit timeUnit)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.apache.log4j.Logger LOG

STORE

protected static final ConfigurationStore STORE

EVALUATOR

public static final ExpressionEvaluator EVALUATOR

RESOLVER

public static final ExpressionHelper RESOLVER
Constructor Detail

AbstractCleanupHandler

public AbstractCleanupHandler()
Method Detail

getRetention

protected long getRetention(Entity entity,
                            Frequency.TimeUnit timeUnit)
                     throws FalconException
Throws:
FalconException

getAllLogs

protected FileStatus[] getAllLogs(org.apache.falcon.entity.v0.cluster.Cluster cluster,
                                  Entity entity)
                           throws FalconException
Throws:
FalconException

getFileSystem

protected FileSystem getFileSystem(org.apache.falcon.entity.v0.cluster.Cluster cluster)
                            throws FalconException
Throws:
FalconException

delete

protected void delete(org.apache.falcon.entity.v0.cluster.Cluster cluster,
                      Entity entity,
                      long retention)
               throws FalconException
Throws:
FalconException

delete

protected void delete(org.apache.falcon.entity.v0.cluster.Cluster cluster,
                      Entity entity,
                      long retention,
                      FileStatus[] logs)
               throws FalconException
Throws:
FalconException

cleanup

public abstract void cleanup()
                      throws FalconException
Throws:
FalconException

getLogPath

protected abstract Path getLogPath(Entity entity,
                                   String stagingPath)

getCurrentColo

protected String getCurrentColo()


Copyright © 2013-2014 Apache Software Foundation. All Rights Reserved.