|
3#
![](static/image/common//ico_lz.png)
楼主 |
发表于 8-4-2016 14:32:47
|
只看该作者
本帖最后由 DDD888 于 8-4-2016 13:59 编辑
The MapReduce framework operates exclusively on <key, value> pairs, that is, the framework views the input to the job as a set of <key, value> pairs and produces a set of <key, value> pairs as the output of the job, conceivably of different types.
The key and value classes have to be serializable by the framework and hence need to implement the Writable interface. Additionally, the key classes have to implement the WritableComparable interface to facilitate sorting by the framework.
Input and Output types of a MapReduce job:
(input) <k1, v1> -> map -> <k2, v2> -> combine -> <k2, v2> -> reduce -> <k3, v3> (output)
https://hadoop.apache.org/docs/r1.2.1/mapred_tutorial.html |
|