【发布时间】:2013-11-05 10:23:26
【问题描述】:
假设我有两个数据集:
hello world
bye world
和
hello earth
new earth
并且我想运行一个未指定映射器类或reducer 类的map-reduce 任务,因此将调用默认的mapper 和reducer - 它们都是标识函数。当我运行作业时,输出是 ::
0 hello world
0 hello earth
12 new earth
12 bye world
我很困惑为什么密钥像 0 和 12 ?!当我在main() ::
// job.setMapperClass(Map.class);
// job.setCombinerClass(Reduce.class);
// job.setReducerClass(Reduce.class);
所以,我的问题是这里的输出键是什么?为什么它看起来像 0, 0, 12, 12?
【问题讨论】:
标签: hadoop default reduce mapper