public class BatchScheduler extends AbstractScheduler
Scheduler.TaskManagerfailCount, isTracked, priority, state, taskManager, taskSpec| Constructor and Description |
|---|
BatchScheduler(String name,
int quantity) |
| Modifier and Type | Method and Description |
|---|---|
void |
adjust()
Adjust the number of running tasks to better track the desired number.
|
void |
completed(Task task) |
int[] |
getProgress()
Return an estimate of progress given as a ratio of (work completed, total
work).
|
int |
getTarget()
Get the desired number of running tasks.
|
boolean |
hasMoreTasks()
If this is a batch scheduler, whether all tasks for the batch have
completed.
|
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.
|
addTasks, change, getName, getRequestTimeoutSec, getResource, getTaskManager, getType, isTracked, limitContainerSize, registerState, setPriority, setTaskManagerpublic BatchScheduler(String name, int quantity)
public void completed(Task task)
public int resize(int level)
Schedulerpublic int getTarget()
Schedulerpublic int[] getProgress()
Schedulerpublic void adjust()
SchedulerSchedulerState registered with
Scheduler.registerState(SchedulerState).public boolean hasMoreTasks()
Schedulerpublic void requestTimedOut()
SchedulerCopyright © 2021 The Apache Software Foundation. All rights reserved.