The MapReduce algorithm contains two important tasks, namely Map and Reduce.
The map task is done by means of Mapper Class
The reduce task is done by means of Reducer Class.
Mapper class takes the input,
tokenizes it,
maps and sorts it.
The output of Mapper class is used as input by Reducer class, which in turn searches matching pairs and reduces them