Hello all,

I am trying to write a reduce function which  takes the map fn output


(k1, v11),
(k1, v12),
(k1, v13),
(k2, v21),
(k2, v22),
(k3,v31)

and produces as a result of the reduce

{
  k1: [v11,v12,v13],
  k2: [v21,v22],
  k3: [v31]
}

where v11 etc could themselves be lists and do not need to be unpacked in
the final result but can stay as nested list of lists.

But I am lost as far as the (keys, values, rereduce) signature.

So far I have managed by just reusing the return sum(values) on numeric
values, but this is different and I need some conceptual help with
reduce/rereduce for non-numeric values and grouping into lists instead of
taking the sum.

Thanks much,

Nitin

37% of all statistics are made up on the spot
-------------------------------------------------------------------------------------
Nitin Borwankar
[email protected]

Reply via email to