@Override public boolean allowSliceRetry(boolean abandon) { boolean skipWriterCheck = !abandon && !context.emitCalled(); return (skipWriterCheck || out.allowSliceRetry()) && reducer.allowSliceRetry(); }
@Override protected void callWorker(KeyValue<K, Iterator<V>> input) { ReducerInput<V> value = ReducerInputs.fromIterator(input.getValue()); reducer.reduce(input.getKey(), value); }
@Override protected long estimateMemoryRequirement() { return in.estimateMemoryRequirement() + getOutputWriter().estimateMemoryRequirement() + reducer.estimateMemoryRequirement(); }
private void fillContext() { context = new ReducerContextImpl<>(getContext(), out); in.setContext(context); out.setContext(context); reducer.setContext(context); }