note一下, 0.20 前使用 org.apache.hadoop.mapred 舊介面 0.20 版本開始引入org.apache.hadoop.mapreduce 的新API 0.20 後使用 http://hadoop.apache.org/docs/current/api/org/apache/hadoop/mapreduce/Mapper.html @InterfaceAudience.Public @InterfaceStability.Stable public class Mapper extends Object Maps input key/value pairs to a set of intermediate key/value pairs. 使用 extends 新的API中引入了 context ,直接替換了,map() , reduce()方法中使用的 OutputCollector ,Reporter object。現在透過調用 Context.write() 輸出key value。 0.20 之後 使用 extends map , extends reduce 去 extend class。 而之前 map ,reduce 則是interface。
文章標籤
全站熱搜
創作者介紹
創作者 peicheng 的頭像
peicheng

FLASHC

peicheng 發表在 痞客邦 留言(0) 人氣(45)