public class BatchTaskScheduler extends java.lang.Object implements ITaskScheduler
| Constructor and Description |
|---|
BatchTaskScheduler() |
| 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.
|
java.util.Map<java.lang.String,TaskSchedulePlan> |
schedule(WorkerPlan workerPlan,
ComputeGraph... computeGraphs)
This method receives the worker plan and the dataflow graph as a variable argument which may
have multiple dataflow graphs.
|
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 java.util.Map<java.lang.String,TaskSchedulePlan> schedule(WorkerPlan workerPlan, ComputeGraph... computeGraphs)
public TaskSchedulePlan schedule(ComputeGraph computeGraph, WorkerPlan workerPlan)
schedule in interface ITaskSchedulercomputeGraph - workerPlan - worker plan