java.lang.Runnablepublic class FileDeletionTask extends DeletionTask implements java.lang.Runnable
DeletionTask handling the removal of files (and directories).INVALID_TASK_ID| Constructor | Description |
|---|---|
FileDeletionTask(int taskId,
DeletionService deletionService,
java.lang.String user,
org.apache.hadoop.fs.Path subDir,
java.util.List<org.apache.hadoop.fs.Path> baseDirs) |
Construct a FileDeletionTask with the default INVALID_TASK_ID.
|
FileDeletionTask(DeletionService deletionService,
java.lang.String user,
org.apache.hadoop.fs.Path subDir,
java.util.List<org.apache.hadoop.fs.Path> baseDirs) |
Construct a FileDeletionTask with the default INVALID_TASK_ID.
|
| Modifier and Type | Method | Description |
|---|---|---|
org.apache.hadoop.yarn.proto.YarnServerNodemanagerRecoveryProtos.DeletionServiceDeleteTaskProto |
convertDeletionTaskToProto() |
Convert the FileDeletionTask to the Protobuf representation for storing
in the state store and recovery.
|
java.util.List<org.apache.hadoop.fs.Path> |
getBaseDirs() |
Get the base directories containing the subdirectory.
|
org.apache.hadoop.fs.Path |
getSubDir() |
Get the subdirectory to delete.
|
void |
run() |
Delete the specified file/directory as the specified user.
|
java.lang.String |
toString() |
Convert the FileDeletionTask to a String representation.
|
addDeletionTaskDependency, decrementAndGetPendingPredecessorTasks, getDeletionService, getDeletionTaskType, getSuccessorTasks, getSucess, getTaskId, getUser, incrementAndGetPendingPredecessorTasks, setSuccess, setTaskIdpublic FileDeletionTask(DeletionService deletionService, java.lang.String user, org.apache.hadoop.fs.Path subDir, java.util.List<org.apache.hadoop.fs.Path> baseDirs)
deletionService - the DeletionService.user - the user deleting the file.subDir - the subdirectory to delete.baseDirs - the base directories containing the subdir.public FileDeletionTask(int taskId,
DeletionService deletionService,
java.lang.String user,
org.apache.hadoop.fs.Path subDir,
java.util.List<org.apache.hadoop.fs.Path> baseDirs)
taskId - the ID of the task, if previously set.deletionService - the DeletionService.user - the user deleting the file.subDir - the subdirectory to delete.baseDirs - the base directories containing the subdir.public org.apache.hadoop.fs.Path getSubDir()
public java.util.List<org.apache.hadoop.fs.Path> getBaseDirs()
public void run()
run in interface java.lang.Runnablepublic java.lang.String toString()
toString in class java.lang.Objectpublic org.apache.hadoop.yarn.proto.YarnServerNodemanagerRecoveryProtos.DeletionServiceDeleteTaskProto convertDeletionTaskToProto()
convertDeletionTaskToProto in class DeletionTaskCopyright © 2008–2025 Apache Software Foundation. All rights reserved.