[hadoop] mapreduce 新旧版本 org.apache.hadoop.mapred vs org.apache.hadoop.mapreduce
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。
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。