use of edu.iu.dsc.tws.api.config.Config in project twister2 by DSC-SPIDAL.
the class ReduceExample method main.
public static void main(String[] args) {
Config config = ResourceAllocator.loadConfig(new HashMap<>());
JobConfig jobConfig = new JobConfig();
BatchTsetExample.submitJob(config, PARALLELISM, jobConfig, ReduceExample.class.getName());
}
use of edu.iu.dsc.tws.api.config.Config in project twister2 by DSC-SPIDAL.
the class TSetExecDemo method main.
public static void main(String[] args) {
Config config = ResourceAllocator.loadConfig(new HashMap<>());
JobConfig jobConfig = new JobConfig();
BatchTsetExample.submitJob(config, PARALLELISM, jobConfig, TSetExecDemo.class.getName());
}
use of edu.iu.dsc.tws.api.config.Config in project twister2 by DSC-SPIDAL.
the class UnionExample2 method main.
public static void main(String[] args) {
Config config = ResourceAllocator.loadConfig(new HashMap<>());
JobConfig jobConfig = new JobConfig();
BatchTsetExample.submitJob(config, PARALLELISM, jobConfig, UnionExample2.class.getName());
}
use of edu.iu.dsc.tws.api.config.Config in project twister2 by DSC-SPIDAL.
the class TSetExample method main.
public static void main(String[] args) throws ParseException {
// first load the configurations from command line and config files
Config config = ResourceAllocator.loadConfig(new HashMap<>());
// build JobConfig
HashMap<String, Object> configurations = new HashMap<>();
configurations.put(SchedulerContext.THREADS_PER_WORKER, 1);
Options options = new Options();
options.addOption(CDFConstants.ARGS_PARALLELISM_VALUE, true, "2");
options.addOption(CDFConstants.ARGS_WORKERS, true, "2");
@SuppressWarnings("deprecation") CommandLineParser commandLineParser = new DefaultParser();
CommandLine commandLine = commandLineParser.parse(options, args);
int instances = Integer.parseInt(commandLine.getOptionValue(CDFConstants.ARGS_WORKERS));
int parallelismValue = Integer.parseInt(commandLine.getOptionValue(CDFConstants.ARGS_PARALLELISM_VALUE));
configurations.put(CDFConstants.ARGS_WORKERS, Integer.toString(instances));
configurations.put(CDFConstants.ARGS_PARALLELISM_VALUE, Integer.toString(parallelismValue));
// build JobConfig
JobConfig jobConfig = new JobConfig();
jobConfig.putAll(configurations);
config = Config.newBuilder().putAll(config).put(SchedulerContext.DRIVER_CLASS, null).build();
Twister2Job twister2Job;
twister2Job = Twister2Job.newBuilder().setWorkerClass(CDFWWorker.class).setJobName(TSetExample.class.getName()).setDriverClass(TSetExample.Driver.class.getName()).addComputeResource(1, 512, instances).setConfig(jobConfig).build();
// now submit the job
Twister2Submitter.submitJob(twister2Job, config);
}
use of edu.iu.dsc.tws.api.config.Config in project twister2 by DSC-SPIDAL.
the class SReduceWindowExample method main.
public static void main(String[] args) {
Config config = ResourceAllocator.loadConfig(new HashMap<>());
JobConfig jobConfig = new JobConfig();
BatchTsetExample.submitJob(config, PARALLELISM, jobConfig, SReduceWindowExample.class.getName());
}
Aggregations