hadoop - Context Object in JAVA MapReduce -
this question has answer here:
what use of context context in map() method.
public void map(longwritable key, text value, context context)
extracted here
in:
map(object key, object value, context context)
to allow serialization , transfer of types of data, java defines own writable class. these box classes text (for string), intwritable (for integers), longwritable (for long) instances of base class writable (for values), , instances of writablecomparable (for keys). context used collect , write ouput intermediate final files.
Comments
Post a Comment