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
FieldsModifier and TypeFieldDescriptionprotected intprotected booleanprotected intprotected SchedulerStateprotected Scheduler.TaskManagerprotected TaskSpec -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddTasks(int n) voidchange(int delta) Increase (positive) or decrease (negative) the number of desired tasks by the given amount.getName()intMaximum 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()booleanWhether tasks from this scheduler should incorporate app startup/shutdown acknowledgements (acks) into the task lifecycle.voidlimitContainerSize(org.apache.hadoop.yarn.api.records.Resource maxResource) voidregisterState(SchedulerState state) Register the state object that tracks tasks launched by this scheduler.voidsetPriority(int priority) Controller-assigned priority for this scheduler.voidsetTaskManager(Scheduler.TaskManager taskManager) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:SchedulerRegister the state object that tracks tasks launched by this scheduler.- Specified by:
registerStatein interfaceScheduler- Parameters:
state-
-
setPriority
public void setPriority(int priority) Description copied from interface:SchedulerController-assigned priority for this scheduler. Used to differentiate container requests by scheduler.- Specified by:
setPriorityin interfaceScheduler- Parameters:
priority-
-
getName
-
getType
-
getTaskManager
- Specified by:
getTaskManagerin interfaceScheduler
-
change
public void change(int delta) Description copied from interface:SchedulerIncrease (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:SchedulerWhether tasks from this scheduler should incorporate app startup/shutdown acknowledgements (acks) into the task lifecycle. -
getResource
Description copied from interface:SchedulerFor reporting, get the YARN resources requested by processes in this pool.- Specified by:
getResourcein interfaceScheduler- Returns:
- The request spec.
-
limitContainerSize
public void limitContainerSize(org.apache.hadoop.yarn.api.records.Resource maxResource) throws AMException - Specified by:
limitContainerSizein interfaceScheduler- Throws:
AMException
-
getRequestTimeoutSec
public int getRequestTimeoutSec()Description copied from interface:SchedulerMaximum 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:
getRequestTimeoutSecin interfaceScheduler- Returns:
- the number of seconds to wait for timeout. 0 means no timeout
-