org.apache.hadoop.mapred
Class CleanupQueue.PathDeletionContext

java.lang.Object
  extended by org.apache.hadoop.mapred.CleanupQueue.PathDeletionContext
Direct Known Subclasses:
TaskController.DeletionContext
Enclosing class:
CleanupQueue

public static class CleanupQueue.PathDeletionContext
extends java.lang.Object

Contains info related to the path of the file/dir to be deleted


Constructor Summary
CleanupQueue.PathDeletionContext(org.apache.hadoop.fs.Path fullPath, org.apache.hadoop.conf.Configuration conf)
           
CleanupQueue.PathDeletionContext(org.apache.hadoop.fs.Path fullPath, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.security.UserGroupInformation ugi, JobID jobIdTokenRenewalToCancel, org.apache.hadoop.fs.FileSystem fs)
          PathDeletionContext ctor which also allows for a job-delegation token renewal to be cancelled.
 
Method Summary
protected  void deletePath()
          Deletes the path (and its subdirectories recursively)
protected  org.apache.hadoop.fs.Path getPathForCleanup()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CleanupQueue.PathDeletionContext

public CleanupQueue.PathDeletionContext(org.apache.hadoop.fs.Path fullPath,
                                        org.apache.hadoop.conf.Configuration conf)

CleanupQueue.PathDeletionContext

public CleanupQueue.PathDeletionContext(org.apache.hadoop.fs.Path fullPath,
                                        org.apache.hadoop.conf.Configuration conf,
                                        org.apache.hadoop.security.UserGroupInformation ugi,
                                        JobID jobIdTokenRenewalToCancel,
                                        org.apache.hadoop.fs.FileSystem fs)
PathDeletionContext ctor which also allows for a job-delegation token renewal to be cancelled. This is usually used at the end of a job to delete it's final path and to cancel renewal of it's job-delegation token.

Parameters:
fullPath - path to be deleted
conf - job configuration
ugi - ugi of the job to be used to delete the path
jobIdTokenRenewalToCancel - jobId of the job whose job-delegation token renewal should be cancelled. No cancellation is attempted if this is null
Method Detail

getPathForCleanup

protected org.apache.hadoop.fs.Path getPathForCleanup()

deletePath

protected void deletePath()
                   throws java.io.IOException,
                          java.lang.InterruptedException
Deletes the path (and its subdirectories recursively)

Throws:
IOException, - InterruptedException
java.io.IOException
java.lang.InterruptedException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2009 The Apache Software Foundation