hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harsh J <ha...@cloudera.com>
Subject Re: how to get all different values for each key
Date Wed, 03 Aug 2011 05:15:35 GMT
Use MapReduce :)

If map output: (key, value)
Then reduce input becomes: (key, [iterator of values across all maps
with (key, value)])

I believe this is very similar to the wordcount example, but minus the
summing. For a given key, you get all the values that carry that key
in the reducer. Have you tried to run a simple program to achieve this
before asking? Or is something specifically not working?

On Wed, Aug 3, 2011 at 9:20 AM, Jianxin Wang <wangjx798@gmail.com> wrote:
> HI,
>    I hava many <key,value> pairs now, and want to get all different values
> for each key, which way is efficient for this work.
>
>   such as input : <1,2> <1,3> <1,4> <1,3> <2,1> <2,2>
>   output: <1,2/3/4> <2,1/2>
>
>   Thanks!
>
> walter
>



-- 
Harsh J

Mime
View raw message