MapReduce job without mapper

hadoop, java, mapreduce

Solution

IdentityMapper is a mapper which maps input directly to output.

Suppose you have an input which is of the format key-value and you don't have anything to do with this at the mapper phase, and the only thing you would like to do is to group the values based on the key and do some aggregation operation at the reducer phase on the values, you can use this mapper.

Problem

This may be very basic question but still may be helpful to many newbies like me. Can there be a MR job without mapper? Any scenario where we need to implement this and the way to do this?

Original source