Mapper interface vs class


2 Answer(s)


hi Lakshman,

Yes, it's possible to emit multiple K,V pairs. By default all Map/reduce programs emit multiple of them.

I think my question is not clear.

Interface API signature:
public void map(K key, V val, OutputCollector output, Reporter reporter).

Class API Signature:
map(Object key, Text value, Context context)

The question is to push multiple K,V pairs do I need to implement Mapper interface or I could just push K,V with context? what are the differences/use cases?