Mapper抽象类参数

Mapper< Object, Text, Text, IntWritable>
Mapper< Text, Text, Text, Text>

Mapper< Text, IntWritable, Text, IntWritable>

第一二个表示输入map的key和value,从InputFormat传过来的,key默认是字符偏移量,value默认是一行

第三四个表示输出的key和value

mapper中的方法map(Object key, Text value, Context context)

key和value表示输入的key和value,处理后的数据写入context,使用方法context.write(key, value);,这里的key和value会传递给下一个过程

posted on 2016-04-08 12:09  长456风  阅读(621)  评论(0编辑  收藏  举报

导航