@Test public void testSingleStageMultiWorker() { TestJobSingleStage provider = new TestJobSingleStage(); SchedulingInfo scheduling = new SchedulingInfo.Builder() .numberOfStages(1) .multiWorkerStage(2, MachineDefinitions.micro()) .build(); LocalJobExecutorNetworked.execute(provider.getJobInstance(), scheduling); Iterator<Integer> iter = provider.getItemsWritten().iterator(); int count = 0; while (iter.hasNext()) { iter.next(); count++; } Assert.assertEquals(20, count); }
@SuppressWarnings( {"rawtypes", "unchecked"}) public static void execute(Job job, Parameter... parameters) throws IllegalMantisJobException { List<StageConfig> stages = job.getStages(); SchedulingInfo.Builder builder = new SchedulingInfo.Builder(); for (@SuppressWarnings("unused") StageConfig stage : stages) { builder.singleWorkerStage(MachineDefinitions.micro()); } builder.numberOfStages(stages.size()); execute(job, builder.build(), parameters); }
LocalJobExecutorNetworked { @SuppressWarnings( {"rawtypes", "unchecked"}) public static void execute(Job job, Parameter... parameters) throws IllegalMantisJobException { List<StageConfig> stages = job.getStages(); SchedulingInfo.Builder builder = new SchedulingInfo.Builder(); for (@SuppressWarnings("unused") StageConfig stage : stages) { builder.singleWorkerStage(MachineDefinitions.micro()); } builder.numberOfStages(stages.size()); execute(job, builder.build(), parameters); } }
LocalJobExecutorNetworked { @SuppressWarnings( {"rawtypes", "unchecked"}) public static void execute(Job job, Parameter... parameters) throws IllegalMantisJobException { List<StageConfig> stages = job.getStages(); SchedulingInfo.Builder builder = new SchedulingInfo.Builder(); for (@SuppressWarnings("unused") StageConfig stage : stages) { builder.singleWorkerStage(MachineDefinitions.micro()); } builder.numberOfStages(stages.size()); execute(job, builder.build(), parameters); } private  LocalJobExecutorNetworked(); }
LocalJobExecutorNetworked { @SuppressWarnings( {"rawtypes", "unchecked"}) public static void execute(Job job, Parameter... parameters) throws IllegalMantisJobException { List<StageConfig> stages = job.getStages(); SchedulingInfo.Builder builder = new SchedulingInfo.Builder(); for (@SuppressWarnings("unused") StageConfig stage : stages) { builder.singleWorkerStage(MachineDefinitions.micro()); } builder.numberOfStages(stages.size()); execute(job, builder.build(), parameters); } private  LocalJobExecutorNetworked(); static Map<String, Object> checkAndGetParameters(Map<String, ParameterDefinition<?>> parameterDefinitions,
                                                            Parameter... parameters); @SuppressWarnings( {"rawtypes", "unchecked"}) static void execute(Job job, Parameter... parameters); @SuppressWarnings( {"rawtypes", "unchecked"}) static void execute(Job job, SchedulingInfo schedulingInfo, Parameter... parameters); }
LocalJobExecutorNetworked { @SuppressWarnings( {"rawtypes", "unchecked"}) public static void execute(Job job, Parameter... parameters) throws IllegalMantisJobException { List<StageConfig> stages = job.getStages(); SchedulingInfo.Builder builder = new SchedulingInfo.Builder(); for (@SuppressWarnings("unused") StageConfig stage : stages) { builder.singleWorkerStage(MachineDefinitions.micro()); } builder.numberOfStages(stages.size()); execute(job, builder.build(), parameters); } private  LocalJobExecutorNetworked(); static Map<String, Object> checkAndGetParameters(Map<String, ParameterDefinition<?>> parameterDefinitions,
                                                            Parameter... parameters); @SuppressWarnings( {"rawtypes", "unchecked"}) static void execute(Job job, Parameter... parameters); @SuppressWarnings( {"rawtypes", "unchecked"}) static void execute(Job job, SchedulingInfo schedulingInfo, Parameter... parameters);  }