public class FileDeletionTask extends DeletionTask implements Runnable
DeletionTask
handling the removal of files (and directories).INVALID_TASK_ID
Constructor and Description |
---|
FileDeletionTask(DeletionService deletionService,
String user,
org.apache.hadoop.fs.Path subDir,
List<org.apache.hadoop.fs.Path> baseDirs)
Construct a FileDeletionTask with the default INVALID_TASK_ID.
|
FileDeletionTask(int taskId,
DeletionService deletionService,
String user,
org.apache.hadoop.fs.Path subDir,
List<org.apache.hadoop.fs.Path> baseDirs)
Construct a FileDeletionTask with the default INVALID_TASK_ID.
|
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.yarn.proto.YarnServerNodemanagerRecoveryProtos.DeletionServiceDeleteTaskProto |
convertDeletionTaskToProto()
Convert the FileDeletionTask to the Protobuf representation for storing
in the state store and recovery.
|
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.
|
String |
toString()
Convert the FileDeletionTask to a String representation.
|
addDeletionTaskDependency, decrementAndGetPendingPredecessorTasks, getDeletionService, getDeletionTaskType, getSuccessorTasks, getSucess, getTaskId, getUser, incrementAndGetPendingPredecessorTasks, setSuccess, setTaskId
public FileDeletionTask(DeletionService deletionService, String user, org.apache.hadoop.fs.Path subDir, 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, String user, org.apache.hadoop.fs.Path subDir, 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 List<org.apache.hadoop.fs.Path> getBaseDirs()
public void run()
public String toString()
public org.apache.hadoop.yarn.proto.YarnServerNodemanagerRecoveryProtos.DeletionServiceDeleteTaskProto convertDeletionTaskToProto()
convertDeletionTaskToProto
in class DeletionTask
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.