public class BatchScheduler extends AbstractScheduler
Scheduler.TaskManager
failCount, 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, setTaskManager
public BatchScheduler(String name, int quantity)
public void completed(Task task)
public int resize(int level)
Scheduler
public int getTarget()
Scheduler
public int[] getProgress()
Scheduler
public void adjust()
Scheduler
SchedulerState
registered with
Scheduler.registerState(SchedulerState)
.public boolean hasMoreTasks()
Scheduler
public void requestTimedOut()
Scheduler
Copyright © 1970 The Apache Software Foundation. All rights reserved.