public class FirstFitStreamingTaskScheduler 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, 1st task -> instance 1 will go to container 0, 2nd task -> instance 0 will go to container 0 (if the total task instance required values doesn't reach the maximum size of container 0. If the container has reached its maximum limit then it will allocate the 2nd task -> instance 1 will go to container 1.
| Constructor and Description |
|---|
FirstFitStreamingTaskScheduler() |
| Modifier and Type | Method and Description |
|---|---|
void |
initialize(Config cfg)
This method initialize the config values received from the user and assign the default
task instance value and container instance values.
|
void |
initialize(Config cfg,
int workerId)
Initialize with the worker id
|
TaskSchedulePlan |
schedule(ComputeGraph computeGraph,
WorkerPlan workerPlan)
This is the base method for the first fit task scheduling.
|
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