Hadoop 中context.collect 和 context.write的区别

来源:互联网 发布:淘宝客推广优缺点 编辑:程序博客网 时间:2024/06/16 04:34

Mark

写MapReduce时,发现很多源码都是写 context.collect 而不是context.write,查阅资料,得到以下结论
老版本是:

output.collect(key, result); // output’s type is: OutputCollector

新版本是:

context.write(key, result); // output’s type is: Context
0 0
原创粉丝点击