org.apache.hadoop.mapred
Class CleanupQueue

java.lang.Object
  extended by org.apache.hadoop.mapred.CleanupQueue

public class CleanupQueue
extends Object


Field Summary
static org.apache.commons.logging.Log LOG
           
 
Constructor Summary
protected CleanupQueue()
          Create a singleton path-clean-up queue.
 
Method Summary
 void addToQueue(org.apache.hadoop.mapred.CleanupQueue.PathDeletionContext... contexts)
          Adds the paths to the queue of paths to be deleted by cleanupThread.
static CleanupQueue getInstance()
           
protected  boolean isQueueEmpty()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG
Constructor Detail

CleanupQueue

protected CleanupQueue()
Create a singleton path-clean-up queue. It can be used to delete paths(directories/files) in a separate thread. This constructor creates a clean-up thread and also starts it as a daemon. Callers can instantiate one CleanupQueue per JVM and can use it for deleting paths. Use addToQueue(PathDeletionContext...) to add paths for deletion.

Method Detail

getInstance

public static CleanupQueue getInstance()

addToQueue

public void addToQueue(org.apache.hadoop.mapred.CleanupQueue.PathDeletionContext... contexts)
Adds the paths to the queue of paths to be deleted by cleanupThread.


isQueueEmpty

protected boolean isQueueEmpty()


Copyright © 2009 The Apache Software Foundation