Search in sources :

Example 16 with Twister2Job

use of edu.iu.dsc.tws.api.Twister2Job in project twister2 by DSC-SPIDAL.

the class TSetSourceExample method main.

public static void main(String[] args) {
    JobConfig jobConfig = new JobConfig();
    Twister2Job job = Twister2Job.newBuilder().setJobName(TSetSourceExample.class.getName()).setConfig(jobConfig).setWorkerClass(TSetSourceExample.class).addComputeResource(1, 512, 4).build();
    Twister2Submitter.submitJob(job);
}
Also used : JobConfig(edu.iu.dsc.tws.api.JobConfig) Twister2Job(edu.iu.dsc.tws.api.Twister2Job)

Example 17 with Twister2Job

use of edu.iu.dsc.tws.api.Twister2Job in project twister2 by DSC-SPIDAL.

the class TSetCachingExample method main.

public static void main(String[] args) {
    JobConfig jobConfig = new JobConfig();
    Twister2Job job = Twister2Job.newBuilder().setJobName(TSetCachingExample.class.getName()).setConfig(jobConfig).setWorkerClass(TSetCachingExample.class).addComputeResource(1, 512, 4).build();
    Twister2Submitter.submitJob(job);
}
Also used : JobConfig(edu.iu.dsc.tws.api.JobConfig) Twister2Job(edu.iu.dsc.tws.api.Twister2Job)

Example 18 with Twister2Job

use of edu.iu.dsc.tws.api.Twister2Job in project twister2 by DSC-SPIDAL.

the class TSetExampleMain method submitJob.

private static void submitJob(Config config, int containers, JobConfig jobConfig, String clazz) {
    LOG.info("Submitting Job ...");
    Twister2Job twister2Job;
    twister2Job = Twister2Job.newBuilder().setJobName(clazz).setWorkerClass(clazz).addComputeResource(1, 512, containers).setConfig(jobConfig).build();
    // now submit the job
    Twister2Submitter.submitJob(twister2Job, config);
}
Also used : Twister2Job(edu.iu.dsc.tws.api.Twister2Job)

Example 19 with Twister2Job

use of edu.iu.dsc.tws.api.Twister2Job in project twister2 by DSC-SPIDAL.

the class HadoopTSet method submitJob.

private static void submitJob(Config config, int containers, JobConfig jobConfig, String clazz) {
    Twister2Job twister2Job;
    twister2Job = Twister2Job.newBuilder().setJobName(clazz).setWorkerClass(clazz).addComputeResource(1, 512, containers).setConfig(jobConfig).build();
    // now submit the job
    Twister2Submitter.submitJob(twister2Job, config);
}
Also used : Twister2Job(edu.iu.dsc.tws.api.Twister2Job)

Example 20 with Twister2Job

use of edu.iu.dsc.tws.api.Twister2Job in project twister2 by DSC-SPIDAL.

the class HelloTSet method submitJob.

private static void submitJob(Config config, int containers, JobConfig jobConfig, String clazz) {
    Twister2Job twister2Job;
    twister2Job = Twister2Job.newBuilder().setJobName(clazz).setWorkerClass(clazz).addComputeResource(1, 512, containers).setConfig(jobConfig).build();
    // now submit the job
    Twister2Submitter.submitJob(twister2Job, config);
}
Also used : Twister2Job(edu.iu.dsc.tws.api.Twister2Job)

Aggregations

Twister2Job (edu.iu.dsc.tws.api.Twister2Job)39 JobConfig (edu.iu.dsc.tws.api.JobConfig)27 Config (edu.iu.dsc.tws.api.config.Config)23 HashMap (java.util.HashMap)11 CommandLine (org.apache.commons.cli.CommandLine)8 CommandLineParser (org.apache.commons.cli.CommandLineParser)7 DefaultParser (org.apache.commons.cli.DefaultParser)7 Options (org.apache.commons.cli.Options)7 Twister2JobState (edu.iu.dsc.tws.api.scheduler.Twister2JobState)4 DataFlowJobConfig (edu.iu.dsc.tws.task.cdfw.DataFlowJobConfig)4 JobAPI (edu.iu.dsc.tws.proto.system.job.JobAPI)3 CDFWWorker (edu.iu.dsc.tws.task.impl.cdfw.CDFWWorker)3 Twister2RuntimeException (edu.iu.dsc.tws.api.exceptions.Twister2RuntimeException)2 KubernetesController (edu.iu.dsc.tws.rsched.schedulers.k8s.KubernetesController)2 LinkedHashMap (java.util.LinkedHashMap)2 Map (java.util.Map)2 DataObject (edu.iu.dsc.tws.api.dataset.DataObject)1 DriverJobState (edu.iu.dsc.tws.api.driver.DriverJobState)1 Twister2Exception (edu.iu.dsc.tws.api.exceptions.Twister2Exception)1 HelloWorld (edu.iu.dsc.tws.examples.basic.HelloWorld)1