public class TaskScheduler extends java.lang.Object implements ITaskScheduler
| Constructor and Description |
|---|
TaskScheduler() |
| Modifier and Type | Method and Description |
|---|---|
void |
initialize(Config cfg)
Intialize the task scheduler with the configuration
|
void |
initialize(Config cfg,
int workerid)
Initialize with the worker id
|
TaskSchedulePlan |
schedule(ComputeGraph graph,
WorkerPlan plan)
This is the base method for the task scheduler to invoke the appropriate task schedulers
either "batch" or "streaming" based on the task type.
|
java.util.Map<java.lang.String,TaskSchedulePlan> |
schedule(WorkerPlan plan,
ComputeGraph... graphs)
This is the base method for the task scheduler to invoke the appropriate task schedulers
either "batch" or "streaming" based on the task type.
|
public void initialize(Config cfg)
ITaskSchedulerinitialize in interface ITaskSchedulercfg - configuration objectpublic void initialize(Config cfg, int workerid)
ITaskSchedulerinitialize in interface ITaskSchedulercfg - configurationworkerid - this worker idpublic TaskSchedulePlan schedule(ComputeGraph graph, WorkerPlan plan)
schedule in interface ITaskSchedulergraph - graphplan - worker planpublic java.util.Map<java.lang.String,TaskSchedulePlan> schedule(WorkerPlan plan, ComputeGraph... graphs)