Search in sources :

Example 36 with ResourceContainer

use of edu.iu.dsc.tws.rsched.spi.resource.ResourceContainer in project twister2 by DSC-SPIDAL.

the class BaseReduceBatchCommunication method main.

public static void main(String[] args) {
    // first load the configurations from command line and config files
    Config config = ResourceAllocator.loadConfig(new HashMap<>());
    // build JobConfig
    JobConfig jobConfig = new JobConfig();
    // build the job
    BasicJob basicJob = BasicJob.newBuilder().setName("basic-batch-reduce").setContainerClass(BaseReduceBatchCommunication.class.getName()).setRequestResource(new ResourceContainer(2, 1024), 4).setConfig(jobConfig).build();
    // now submit the job
    Twister2Submitter.submitContainerJob(basicJob, config);
}
Also used : BasicJob(edu.iu.dsc.tws.api.basic.job.BasicJob) JobConfig(edu.iu.dsc.tws.api.JobConfig) Config(edu.iu.dsc.tws.common.config.Config) JobConfig(edu.iu.dsc.tws.api.JobConfig) ResourceContainer(edu.iu.dsc.tws.rsched.spi.resource.ResourceContainer)

Example 37 with ResourceContainer

use of edu.iu.dsc.tws.rsched.spi.resource.ResourceContainer in project twister2 by DSC-SPIDAL.

the class BaseReduceHLCommunication method main.

public static void main(String[] args) {
    // first load the configurations from command line and config files
    Config config = ResourceAllocator.loadConfig(new HashMap<>());
    // build JobConfig
    JobConfig jobConfig = new JobConfig();
    // build the job
    BasicJob basicJob = BasicJob.newBuilder().setName("basic-hl-reduce").setContainerClass(BaseReduceHLCommunication.class.getName()).setRequestResource(new ResourceContainer(2, 1024), 4).setConfig(jobConfig).build();
    // now submit the job
    Twister2Submitter.submitContainerJob(basicJob, config);
}
Also used : BasicJob(edu.iu.dsc.tws.api.basic.job.BasicJob) JobConfig(edu.iu.dsc.tws.api.JobConfig) Config(edu.iu.dsc.tws.common.config.Config) JobConfig(edu.iu.dsc.tws.api.JobConfig) ResourceContainer(edu.iu.dsc.tws.rsched.spi.resource.ResourceContainer)

Example 38 with ResourceContainer

use of edu.iu.dsc.tws.rsched.spi.resource.ResourceContainer in project twister2 by DSC-SPIDAL.

the class BasicTaskSchedulingJob method main.

public static void main(String[] args) {
    // first load the configurations from command line and config files
    Config config = ResourceAllocator.loadConfig(new HashMap<>());
    // build JobConfig
    JobConfig jobConfig = new JobConfig();
    // build the job
    BasicJob basicJob = BasicJob.newBuilder().setName("basic-testing").setContainerClass(TaskScheduling.class.getName()).setRequestResource(new ResourceContainer(2, 1024), 2).setConfig(jobConfig).build();
    // now submit the job
    Twister2Submitter.submitContainerJob(basicJob, config);
}
Also used : BasicJob(edu.iu.dsc.tws.api.basic.job.BasicJob) Config(edu.iu.dsc.tws.common.config.Config) JobConfig(edu.iu.dsc.tws.api.JobConfig) JobConfig(edu.iu.dsc.tws.api.JobConfig) ResourceContainer(edu.iu.dsc.tws.rsched.spi.resource.ResourceContainer)

Aggregations

ResourceContainer (edu.iu.dsc.tws.rsched.spi.resource.ResourceContainer)38 JobConfig (edu.iu.dsc.tws.api.JobConfig)31 BasicJob (edu.iu.dsc.tws.api.basic.job.BasicJob)31 Config (edu.iu.dsc.tws.common.config.Config)30 TaskPlan (edu.iu.dsc.tws.comms.core.TaskPlan)4 ArrayList (java.util.ArrayList)4 HashMap (java.util.HashMap)4 HashSet (java.util.HashSet)4 List (java.util.List)4 Map (java.util.Map)4 Set (java.util.Set)4 JobAPI (edu.iu.dsc.tws.proto.system.job.JobAPI)1 RequestedResources (edu.iu.dsc.tws.rsched.spi.resource.RequestedResources)1