hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Woody <justin.wo...@gmail.com>
Subject Re: Split Mapper Output
Date Wed, 12 Oct 2011 19:06:23 GMT
Ke,

Check out the MultipleOutputs class. I think that's what you need. The
Javadoc has an example as well.

Justin

On Wed, Oct 12, 2011 at 3:00 PM, Ke Zhai <zhaike@cs.umd.edu> wrote:
> Hi, all,
>
> I am trying to write an application which needs the mapper to split its output to file
and reducer.
> For example, if a mapper produces two key-value pairs (a, 1) and (b, 2), how can I write
record (a, 1) directly to a file on HDFS, while still pass record (b, 2) to a reducer?
>
> Best,
> Ke

Mime
View raw message