hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Kimball <aa...@cloudera.com>
Subject Re: Does it possible that output value type of Map function different from final type?
Date Mon, 22 Mar 2010 02:59:21 GMT
Glad you figured out your bug. It's worth pointing out that Google's
MapReduce has stricter type signatures than Hadoop does. Hadoop allows the
final (k, v) pairs to be of a different type than the inputs to the reducer,
and the final key associated with a final value does not necessarily need to
be the same as the intermediate key.

i.e.:
map:     (k1, v1) -> list(k2, v2)
reduce: (k2, list(v2)) -> list(k3, v3)

- Aaron

On Sun, Mar 21, 2010 at 10:10 AM, welman Lu <welmanwenzi@gmail.com> wrote:

> Hi, all
>
> I solved it!
> By through set:
>
>         conf.setMapOutputKeyClass(Text.class);
>         conf.setMapOutputValueClass(BytesWritable.class);
>         conf.setOutputKeyClass(Text.class);
>         conf.setOutputValueClass(Text.class);
>
> So stupid I am! I need to read more documents first!
>
> Best Regards
> Jiamin Lu
>
>
>

Mime
View raw message