Combiner can be viewed as mini-reducers in the map phase. They perform a local-reduce on the mapper results before they are distributed further. Once the Combiner functionality is executed, it is then passed on to the Reducer for further work.
where as
Partitioner
come into the picture when we are working on more than one Reducer. So, the partitioner decide which reducer is responsible for a particular key. They basically take theMapper
Result(ifCombiner
is used thenCombiner
Result) and send it to the responsible Reducer based on the key
With Combiner and Partitioner scenario :
With Partitioner only scenario :
Examples :