hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arun C Murthy <ar...@yahoo-inc.com>
Subject Re: Multiple keys
Date Tue, 04 Dec 2007 04:20:18 GMT
Rui Shi wrote:
> Hi,
> I need to sort the data by multiple keys. Is there any built-in support in Hadoop? 

Rui, could you sketch the exact task on hand for us?

Generally, the idea to set the map-output keys to be _complex_ and 
define necessary comparators to sort by multiple keys.


Map-input: <K1, V1>
Map-output: <(K2, K3), V2>
Reduce-output: <K4, V3>

So, as long as you have the necessary comparator defined for (K2, K3) 
you are golden.

Does that work for you?


> Thanks,
> Rui
>       ____________________________________________________________________________________
> Be a better pen pal. 
> Text or chat with friends inside Yahoo! Mail. See how.  http://overview.mail.yahoo.com/

View raw message