.setJobName("Shard-retry failed").setKeyMarshaller(Marshallers.getStringMarshaller())
.setValueMarshaller(Marshallers.getLongMarshaller()).build();
String jobId = pipelineService.startNewPipeline(new MapReduceJob<>(mrSpec, mrSettings));
assertFalse(jobId.isEmpty());
executeTasksUntilEmpty("default");
JobInfo info = pipelineService.getJobInfo(jobId);
assertNull(info.getOutput());
assertEquals(JobInfo.State.STOPPED_BY_ERROR, info.getJobState());
assertTrue(info.getException().getMessage()
.matches("Stage map-.* was not completed successfuly \\(status=ERROR, message=.*\\)"));
}
// Disallow slice-retry
runs = new int[][] { {5, 0}, {0, 5}, {4, 1}, {1, 4}};
for (int[] run : runs) {
RandomLongInput input = new RandomLongInput(10, shardsCount);
RougeMapper mapper = new RougeMapper(shardsCount, run[0], run[1]);
mapper.setAllowSliceRetry(false);
MapReduceSettings mrSettings = new MapReduceSettings.Builder().setMillisPerSlice(0).build();
MapReduceSpecification<Long, String, Long, String, String> mrSpec =
new MapReduceSpecification.Builder<>(input, mapper,
NoReducer.<String, Long, String>create(), new NoOutput<String, String>())
.setJobName("Shard-retry failed").setKeyMarshaller(Marshallers.getStringMarshaller())
.setValueMarshaller(Marshallers.getLongMarshaller()).build();
String jobId = pipelineService.startNewPipeline(new MapReduceJob<>(mrSpec, mrSettings));
assertFalse(jobId.isEmpty());
executeTasksUntilEmpty("default");
JobInfo info = pipelineService.getJobInfo(jobId);
assertNull(info.getOutput());
assertEquals(JobInfo.State.STOPPED_BY_ERROR, info.getJobState());
assertTrue(info.getException().getMessage()
.matches("Stage map-.* was not completed successfuly \\(status=ERROR, message=.*\\)"));
}
}