@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)
PendingTaskGroupQueue
enqueue
in interface PendingTaskGroupQueue
scheduledTaskGroup
- to enqueue.public Optional<ScheduledTaskGroup> dequeue()
dequeue
in interface PendingTaskGroupQueue
public void removeTaskGroupsAndDescendants(String stageId)
removeTaskGroupsAndDescendants
in interface PendingTaskGroupQueue
stageId
- for the stage to begin the removal recursively.public void onJobScheduled(PhysicalPlan physicalPlanForJob)
PendingTaskGroupQueue
onJobScheduled
in interface PendingTaskGroupQueue
physicalPlanForJob
- the job to schedule.public boolean isEmpty()
PendingTaskGroupQueue
isEmpty
in interface PendingTaskGroupQueue
public void close()
PendingTaskGroupQueue
close
in interface PendingTaskGroupQueue
Copyright © 2018. All rights reserved.