Package org.apache.drill.yarn.appMaster
Class BatchScheduler
java.lang.Object
org.apache.drill.yarn.appMaster.AbstractScheduler
org.apache.drill.yarn.appMaster.BatchScheduler
- All Implemented Interfaces:
Scheduler
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.drill.yarn.appMaster.Scheduler
Scheduler.TaskManager -
Field Summary
Fields inherited from class org.apache.drill.yarn.appMaster.AbstractScheduler
failCount, isTracked, priority, state, taskManager, taskSpec -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadjust()Adjust the number of running tasks to better track the desired number.voidint[]Return an estimate of progress given as a ratio of (work completed, total work).intGet the desired number of running tasks.booleanIf this is a batch scheduler, whether all tasks for the batch have completed.voidInforms the scheduler that a YARN resource request timed out.intresize(int level) Set the number of desired tasks to the given level.Methods inherited from class org.apache.drill.yarn.appMaster.AbstractScheduler
addTasks, change, getName, getRequestTimeoutSec, getResource, getTaskManager, getType, isTracked, limitContainerSize, registerState, setPriority, setTaskManager
-
Constructor Details
-
BatchScheduler
-
-
Method Details
-
completed
-
resize
public int resize(int level) Description copied from interface:SchedulerSet the number of desired tasks to the given level.- Parameters:
level-- Returns:
- the actual resize level, which may be lower than the requested level if the system cannot provide the requested level
-
getTarget
public int getTarget()Description copied from interface:SchedulerGet the desired number of running tasks.- Returns:
- The desired number of running tasks
-
getProgress
public int[] getProgress()Description copied from interface:SchedulerReturn an estimate of progress given as a ratio of (work completed, total work).- Returns:
- Estimate of progress.
-
adjust
public void adjust()Description copied from interface:SchedulerAdjust the number of running tasks to better track the desired number. Starts or stops tasks using theSchedulerStateregistered withScheduler.registerState(SchedulerState). -
hasMoreTasks
public boolean hasMoreTasks()Description copied from interface:SchedulerIf this is a batch scheduler, whether all tasks for the batch have completed. If this is a persistent task scheduler, always returns false.- Returns:
- true if the scheduler has more tasks to run, false if the scheduler has no more tasks or manages a set of long-running tasks
-
requestTimedOut
public void requestTimedOut()Description copied from interface:SchedulerInforms the scheduler that a YARN resource request timed out. The scheduler can either retry or (more productively) assume that the requested node is not available and adjust its target size downward.
-