From some articles, I know that the combiner will work on the card side and on the gear side, and it will work 0 ~ N times. And I know that our mapreduce program should get the same result, regardless of whether the combiner is called.
But I have one special situation that requires the adder to be called at least once, does anyone know how to make sure that?
PS., In maptask.java I saw the line:
if (null == combinerClass || numSpills < minSpillsForCombine) { Merger.writeFile(kvIter, writer, reporter); } else { combineCollector.setWriter(writer); combineAndSpill(kvIter, combineInputCounter); }
If I set minSpillsForCombine to zero, can I make sure that the adder will be called at least once?
Thanks a lot!
source share