Hi Kevin, This is a very common technique. Look for secondary sort in Tom White's HTGD (Chapter 6). You'll most likely have to write your own Partitioner and WritableComparator. -- Alex K
On Sun, Jun 13, 2010 at 7:16 PM, Kevin Tse <[email protected]> wrote: > Hi, > For each key, there might be millions of values(LongWritable), but I only > want to emit top 20 of these values which I want to be sorted in descending > order. > So is it possible to sort these values before they enter the reduce phase? > > Thank you in advance! > Kevin >
