use of edu.iu.dsc.tws.tsched.builder.TaskSchedulePlanBuilder in project twister2 by DSC-SPIDAL.
the class FirstFitTaskScheduling method tschedule.
public TaskSchedulePlan tschedule() throws ScheduleException {
TaskSchedulePlanBuilder taskSchedulePlanBuilder = newTaskSchedulingPlanBuilder(null);
System.out.println("Task schedule plan container maximum ram value is:\t" + taskSchedulePlanBuilder.getContainerMaximumResourceValue().getDisk());
taskSchedulePlanBuilder = FirstFitFTaskSchedulingAlgorithm(taskSchedulePlanBuilder);
return taskSchedulePlanBuilder.build();
}
use of edu.iu.dsc.tws.tsched.builder.TaskSchedulePlanBuilder in project twister2 by DSC-SPIDAL.
the class FirstFitStreamingTaskScheduler method schedule.
/**
* This is the base method for the first fit task scheduling. It invokes the taskscheduleplan
* builder to allocate the task instances into the containers.
*/
@Override
public TaskSchedulePlan schedule(ComputeGraph computeGraph, WorkerPlan workerPlan) {
this.taskVertexSet = computeGraph.getTaskVertexSet();
TaskSchedulePlanBuilder taskSchedulePlanBuilder = newTaskSchedulingPlanBuilder(null);
try {
taskSchedulePlanBuilder = FirstFitFTaskSchedulingAlgorithm(taskSchedulePlanBuilder);
} catch (TaskSchedulerException te) {
throw new TaskSchedulerException("Couldn't allocate all instances to task schedule plan", te);
}
return taskSchedulePlanBuilder.build();
}
Aggregations