Package org.apache.drill.yarn.appMaster
Class AbstractScheduler
java.lang.Object
org.apache.drill.yarn.appMaster.AbstractScheduler
- All Implemented Interfaces:
Scheduler
- Direct Known Subclasses:
BatchScheduler
,PersistentTaskScheduler
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.drill.yarn.appMaster.Scheduler
Scheduler.TaskManager
-
Field Summary
Modifier and TypeFieldDescriptionprotected int
protected boolean
protected int
protected SchedulerState
protected Scheduler.TaskManager
protected TaskSpec
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addTasks
(int n) void
change
(int delta) Increase (positive) or decrease (negative) the number of desired tasks by the given amount.getName()
int
Maximum amount of time to wait when cancelling a job in the REQUESTING state.For reporting, get the YARN resources requested by processes in this pool.getType()
boolean
Whether tasks from this scheduler should incorporate app startup/shutdown acknowledgements (acks) into the task lifecycle.void
limitContainerSize
(org.apache.hadoop.yarn.api.records.Resource maxResource) void
registerState
(SchedulerState state) Register the state object that tracks tasks launched by this scheduler.void
setPriority
(int priority) Controller-assigned priority for this scheduler.void
setTaskManager
(Scheduler.TaskManager taskManager) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.drill.yarn.appMaster.Scheduler
adjust, completed, getProgress, getTarget, hasMoreTasks, requestTimedOut, resize
-
Field Details
-
taskSpec
-
priority
protected int priority -
failCount
protected int failCount -
taskManager
-
state
-
isTracked
protected boolean isTracked
-
-
Constructor Details
-
AbstractScheduler
-
-
Method Details
-
setTaskManager
-
registerState
Description copied from interface:Scheduler
Register the state object that tracks tasks launched by this scheduler.- Specified by:
registerState
in interfaceScheduler
-
setPriority
public void setPriority(int priority) Description copied from interface:Scheduler
Controller-assigned priority for this scheduler. Used to differentiate container requests by scheduler.- Specified by:
setPriority
in interfaceScheduler
-
getName
-
getType
-
getTaskManager
- Specified by:
getTaskManager
in interfaceScheduler
-
change
public void change(int delta) Description copied from interface:Scheduler
Increase (positive) or decrease (negative) the number of desired tasks by the given amount. -
addTasks
protected void addTasks(int n) -
isTracked
public boolean isTracked()Description copied from interface:Scheduler
Whether tasks from this scheduler should incorporate app startup/shutdown acknowledgements (acks) into the task lifecycle. -
getResource
Description copied from interface:Scheduler
For reporting, get the YARN resources requested by processes in this pool.- Specified by:
getResource
in interfaceScheduler
- Returns:
- The request spec.
-
limitContainerSize
public void limitContainerSize(org.apache.hadoop.yarn.api.records.Resource maxResource) throws AMException - Specified by:
limitContainerSize
in interfaceScheduler
- Throws:
AMException
-
getRequestTimeoutSec
public int getRequestTimeoutSec()Description copied from interface:Scheduler
Maximum amount of time to wait when cancelling a job in the REQUESTING state. YARN will happily wait forever for a resource, this setting forcibly cancels the request at timeout.- Specified by:
getRequestTimeoutSec
in interfaceScheduler
- Returns:
- the number of seconds to wait for timeout. 0 means no timeout
-