Pipeline pipeline = new MRPipeline(FailIT.class, tempDir.getDefaultConfiguration());
PCollection<String> p = pipeline.readTextFile(tempDir.copyResourceFileName("shakes.txt"));
PCollection<Integer> result = p.parallelDo(new InverseFn(), Writables.ints());
result.cache();
PipelineExecution execution = pipeline.runAsync();
while (!execution.isDone() && !execution.isCancelled()
&& execution.getStatus() != PipelineExecution.Status.FAILED
&& execution.getResult() == null) {
try {