Search in sources :

Example 36 with WorkerPlan

use of edu.iu.dsc.tws.api.compute.schedule.elements.WorkerPlan in project twister2 by DSC-SPIDAL.

the class TaskSchedulerTest method testUniqueSchedules1.

@Test
public void testUniqueSchedules1() {
    int parallel = 2;
    ComputeGraph graph = createStreamingGraph(parallel);
    TaskScheduler scheduler = new TaskScheduler();
    Config config = getConfig();
    scheduler.initialize(config);
    WorkerPlan workerPlan = createWorkPlan(parallel);
    if (graph.getOperationMode().equals("STREAMING")) {
        Assert.assertEquals(scheduler.getClass(), TaskSchedulerContext.streamingTaskSchedulingClass(config));
    }
    TaskSchedulePlan plan1 = scheduler.schedule(graph, workerPlan);
    Assert.assertNotNull(plan1);
}
Also used : TaskSchedulePlan(edu.iu.dsc.tws.api.compute.schedule.elements.TaskSchedulePlan) ComputeGraph(edu.iu.dsc.tws.api.compute.graph.ComputeGraph) Config(edu.iu.dsc.tws.api.config.Config) WorkerPlan(edu.iu.dsc.tws.api.compute.schedule.elements.WorkerPlan) TaskSchedulerClassTest(edu.iu.dsc.tws.tsched.utils.TaskSchedulerClassTest) Test(org.junit.Test)

Aggregations

WorkerPlan (edu.iu.dsc.tws.api.compute.schedule.elements.WorkerPlan)36 TaskSchedulePlan (edu.iu.dsc.tws.api.compute.schedule.elements.TaskSchedulePlan)28 ComputeGraph (edu.iu.dsc.tws.api.compute.graph.ComputeGraph)24 TaskSchedulerClassTest (edu.iu.dsc.tws.tsched.utils.TaskSchedulerClassTest)23 Test (org.junit.Test)23 WorkerSchedulePlan (edu.iu.dsc.tws.api.compute.schedule.elements.WorkerSchedulePlan)20 TaskInstancePlan (edu.iu.dsc.tws.api.compute.schedule.elements.TaskInstancePlan)18 Map (java.util.Map)18 Config (edu.iu.dsc.tws.api.config.Config)11 Worker (edu.iu.dsc.tws.api.compute.schedule.elements.Worker)8 DataLocalityBatchTaskScheduler (edu.iu.dsc.tws.tsched.batch.datalocalityaware.DataLocalityBatchTaskScheduler)4 ExecutionPlanBuilder (edu.iu.dsc.tws.executor.core.ExecutionPlanBuilder)3 DataLocalityStreamingTaskScheduler (edu.iu.dsc.tws.tsched.streaming.datalocalityaware.DataLocalityStreamingTaskScheduler)3 Communicator (edu.iu.dsc.tws.api.comms.Communicator)2 TWSChannel (edu.iu.dsc.tws.api.comms.channel.TWSChannel)2 TaskSchedulerException (edu.iu.dsc.tws.api.compute.exceptions.TaskSchedulerException)2 ExecutionPlan (edu.iu.dsc.tws.api.compute.executor.ExecutionPlan)2 Path (edu.iu.dsc.tws.api.data.Path)2 TimeoutException (edu.iu.dsc.tws.api.exceptions.TimeoutException)2 Twister2RuntimeException (edu.iu.dsc.tws.api.exceptions.Twister2RuntimeException)2