What is Partitioner and its usage?

Partitioner is another crucial step that controls the partitioning using a hash feature of the intermediate map output keys. In which reducer a key value pair (of the output map) is supplied, the partitioning process selects. The number of divisions corresponds to the total number of tasks to be reduced.

The default class in Hadoop is Hash Partitioner, which implements the following method.

TakePartition (K key, V value, int numReduceTasks)
The function produces a partition number that is the number of the fixed reducers with numReduceTasks.