hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vinod Kumar Vavilapalli <vino...@hortonworks.com>
Subject Re: GroupingComparator
Date Tue, 16 Oct 2012 18:44:29 GMT
On Oct 15, 2012, at 12:27 PM, Dave Beech wrote:

> This only happens in the new "mapreduce" API - in the older "mapred"
> API you get the first key, and it appears to stay the same during the
> loop.
> It's sometimes useful behaviour, but it's confusing how the two APIs
> don't act the same.

Yes, it is a bit counter intuitive. In the older API, there is no way to find out the current
key corresponding to the current value in case there is a grouping-comparator/secondary sort.
The newer API gives you this facility and that naturally changes the behavior of the key.

FWIW, we can document this as part of the Reducer class' javadoc.

View raw message