public abstract class DeletionTask extends Object implements Runnable
DeletionService for deletion.| Modifier and Type | Field and Description |
|---|---|
static int |
INVALID_TASK_ID |
| Constructor and Description |
|---|
DeletionTask(int taskId,
DeletionService deletionService,
String user,
AtomicInteger numberOfPendingPredecessorTasks,
Set<DeletionTask> successorTaskSet,
DeletionTaskType deletionTaskType)
Deletion task with taskId and user supplied values.
|
DeletionTask(int taskId,
DeletionService deletionService,
String user,
DeletionTaskType deletionTaskType)
Deletion task with taskId and default values.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDeletionTaskDependency(DeletionTask successorTask)
Add a dependent DeletionTask.
|
abstract org.apache.hadoop.yarn.proto.YarnServerNodemanagerRecoveryProtos.DeletionServiceDeleteTaskProto |
convertDeletionTaskToProto()
Convert the DeletionTask to the Protobuf representation for storing in the
state store and recovery.
|
int |
decrementAndGetPendingPredecessorTasks()
Decrements and returns pending predecessor task count.
|
DeletionService |
getDeletionService()
Get the
DeletionService for this DeletionTask. |
DeletionTaskType |
getDeletionTaskType()
Get the
DeletionTaskType for this DeletionTask. |
DeletionTask[] |
getSuccessorTasks()
Return the list of successor tasks for the DeletionTask.
|
boolean |
getSucess()
Return the DeletionTask run status.
|
int |
getTaskId()
Get the taskId for the DeletionTask.
|
String |
getUser()
The the user assoicated with the DeletionTask.
|
int |
incrementAndGetPendingPredecessorTasks()
Increments and returns pending predecessor task count.
|
void |
setSuccess(boolean success)
Set the DeletionTask run status.
|
void |
setTaskId(int taskId)
Set the taskId for the DeletionTask.
|
public static final int INVALID_TASK_ID
public DeletionTask(int taskId,
DeletionService deletionService,
String user,
DeletionTaskType deletionTaskType)
taskId - the ID of the task, if previously set.deletionService - the DeletionService.user - the user associated with the delete.deletionTaskType - the DeletionTaskType.public DeletionTask(int taskId,
DeletionService deletionService,
String user,
AtomicInteger numberOfPendingPredecessorTasks,
Set<DeletionTask> successorTaskSet,
DeletionTaskType deletionTaskType)
taskId - the ID of the task, if previously set.deletionService - the DeletionService.user - the user associated with the delete.numberOfPendingPredecessorTasks - Number of pending tasks.successorTaskSet - the list of successor DeletionTasksdeletionTaskType - the DeletionTaskType.public int getTaskId()
public void setTaskId(int taskId)
taskId - the taskId.public String getUser()
public DeletionService getDeletionService()
DeletionService for this DeletionTask.DeletionService.public DeletionTaskType getDeletionTaskType()
DeletionTaskType for this DeletionTask.DeletionTaskType.public void setSuccess(boolean success)
success - the status of the running DeletionTask.public boolean getSucess()
public DeletionTask[] getSuccessorTasks()
public abstract org.apache.hadoop.yarn.proto.YarnServerNodemanagerRecoveryProtos.DeletionServiceDeleteTaskProto convertDeletionTaskToProto()
public void addDeletionTaskDependency(DeletionTask successorTask)
successorTask - the DeletionTask the depends on this DeletionTask.public int incrementAndGetPendingPredecessorTasks()
public int decrementAndGetPendingPredecessorTasks()
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.