public class RoundRobinBatchTaskScheduler extends java.lang.Object implements ITaskScheduler
For example, if there are two tasks with parallelism value of 2, 1st task -> instance 0 will go to container 0, 2nd task -> instance 0 will go to container 1, 1st task -> instance 1 will go to container 1, 2nd task -> instance 1 will go to container 1.
| Constructor and Description |
|---|
RoundRobinBatchTaskScheduler() |
| Modifier and Type | Method and Description |
|---|---|
void |
initialize(Config cfg)
This method initialize the task instance values with the values specified in the task config
object.
|
void |
initialize(Config cfg,
int workerid)
Initialize with the worker id
|
TaskSchedulePlan |
schedule(ComputeGraph computeGraph,
WorkerPlan workerPlan)
This is the base method which receives the dataflow taskgraph and the worker plan to allocate
the task instances to the appropriate workers with their required ram, disk, and cpu values.
|
public void initialize(Config cfg)
initialize in interface ITaskSchedulercfg - configuration objectpublic void initialize(Config cfg, int workerid)
ITaskSchedulerinitialize in interface ITaskSchedulercfg - configurationworkerid - this worker idpublic TaskSchedulePlan schedule(ComputeGraph computeGraph, WorkerPlan workerPlan)
schedule in interface ITaskSchedulercomputeGraph - graphworkerPlan - worker plan