public interface Scheduler
Schedulers can manage batch task (which do their job and complete), or persistent tasks (which run until terminated.)
The scheduler tracks task completion (for batch tasks) and task levels (for persistent tasks.)
Modifier and Type | Interface and Description |
---|---|
static interface |
Scheduler.TaskManager |
Modifier and Type | Method and Description |
---|---|
void |
adjust()
Adjust the number of running tasks to better track the desired number.
|
void |
change(int delta)
Increase (positive) or decrease (negative) the number of desired tasks by
the given amount.
|
void |
completed(Task task) |
String |
getName() |
int[] |
getProgress()
Return an estimate of progress given as a ratio of (work completed, total
work).
|
int |
getRequestTimeoutSec()
Maximum amount of time to wait when cancelling a job in the REQUESTING
state.
|
ContainerRequestSpec |
getResource()
For reporting, get the YARN resources requested by processes in
this pool.
|
int |
getTarget()
Get the desired number of running tasks.
|
Scheduler.TaskManager |
getTaskManager() |
String |
getType() |
boolean |
hasMoreTasks()
If this is a batch scheduler, whether all tasks for the batch have
completed.
|
boolean |
isTracked()
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 |
requestTimedOut()
Informs the scheduler that a YARN resource request timed out.
|
int |
resize(int level)
Set the number of desired tasks to the given level.
|
void |
setPriority(int priority)
Controller-assigned priority for this scheduler.
|
void setPriority(int priority)
priority
- void registerState(SchedulerState state)
state
- String getName()
String getType()
boolean isTracked()
Scheduler.TaskManager getTaskManager()
int getTarget()
void change(int delta)
delta
- int resize(int level)
level
- void completed(Task task)
void adjust()
SchedulerState
registered with
registerState(SchedulerState)
.int[] getProgress()
boolean hasMoreTasks()
ContainerRequestSpec getResource()
void limitContainerSize(org.apache.hadoop.yarn.api.records.Resource maxResource) throws AMException
AMException
int getRequestTimeoutSec()
void requestTimedOut()
Copyright © 1970 The Apache Software Foundation. All rights reserved.