@ThreadSafe public final class SingleJobTaskGroupQueue extends Object implements PendingTaskGroupQueue
| Constructor and Description |
|---|
SingleJobTaskGroupQueue() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes and cleans up this queue.
|
Optional<ScheduledTaskGroup> |
dequeue()
Dequeues the next TaskGroup to be scheduled according to job dependency priority.
|
void |
enqueue(ScheduledTaskGroup scheduledTaskGroup)
Enqueues a TaskGroup to this PQ.
|
boolean |
isEmpty()
Checks whether there are schedulable TaskGroups in the queue or not.
|
void |
onJobScheduled(PhysicalPlan physicalPlanForJob)
Registers a job to this queue in case the queue needs to understand the topology of the job DAG.
|
void |
removeTaskGroupsAndDescendants(String stageId)
Removes a stage and its descendant stages from this PQ.
|
public void enqueue(ScheduledTaskGroup scheduledTaskGroup)
PendingTaskGroupQueueenqueue in interface PendingTaskGroupQueuescheduledTaskGroup - to enqueue.public Optional<ScheduledTaskGroup> dequeue()
dequeue in interface PendingTaskGroupQueuepublic void removeTaskGroupsAndDescendants(String stageId)
removeTaskGroupsAndDescendants in interface PendingTaskGroupQueuestageId - for the stage to begin the removal recursively.public void onJobScheduled(PhysicalPlan physicalPlanForJob)
PendingTaskGroupQueueonJobScheduled in interface PendingTaskGroupQueuephysicalPlanForJob - the job to schedule.public boolean isEmpty()
PendingTaskGroupQueueisEmpty in interface PendingTaskGroupQueuepublic void close()
PendingTaskGroupQueueclose in interface PendingTaskGroupQueueCopyright © 2018. All rights reserved.