【发布时间】:2014-01-25 00:19:04
【问题描述】:
我必须实现两个 mapReduce 作业,其中阶段 II (Mapper_2) 中的 Mapper 需要在阶段 I (reducer_1) 中具有 Reducer 的输出。
Mapper_2 还需要另一个输入,即一个大文本文件 (2TB)。
我已经写了如下,但我的问题是:文本输入将在集群中的节点之间拆分,但是 reducer_1 的输出呢,因为我希望第二阶段的每个映射器都拥有整个 Reducer_1 的输出。
MultipleInputs.addInputPath(Job, TextInputPath, SomeInputFormat.class, Mapper_2.class);
MultipleInputs.addInputPath(Job, Ruducer_1OutputPath, SomeInputFormat.class, Mapper_2.class);
【问题讨论】: