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)
ITaskScheduler
initialize
in interface ITaskScheduler
cfg
- configuration objectpublic void initialize(Config cfg, int workerid)
ITaskScheduler
initialize
in interface ITaskScheduler
cfg
- configurationworkerid
- this worker idpublic TaskSchedulePlan schedule(ComputeGraph graph, WorkerPlan plan)
schedule
in interface ITaskScheduler
graph
- graphplan
- worker planpublic java.util.Map<java.lang.String,TaskSchedulePlan> schedule(WorkerPlan plan, ComputeGraph... graphs)