Search in sources :

Example 1 with TaskSchedulePlanBuilder

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();
}
Also used : TaskSchedulePlanBuilder(edu.iu.dsc.tws.tsched.builder.TaskSchedulePlanBuilder)

Example 2 with TaskSchedulePlanBuilder

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();
}
Also used : TaskSchedulePlanBuilder(edu.iu.dsc.tws.tsched.builder.TaskSchedulePlanBuilder) TaskSchedulerException(edu.iu.dsc.tws.api.compute.exceptions.TaskSchedulerException)

Aggregations

TaskSchedulePlanBuilder (edu.iu.dsc.tws.tsched.builder.TaskSchedulePlanBuilder)2 TaskSchedulerException (edu.iu.dsc.tws.api.compute.exceptions.TaskSchedulerException)1