incubator-crunch-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashish <paliwalash...@gmail.com>
Subject Sorting output of WordCount example
Date Wed, 14 Nov 2012 11:36:05 GMT
Hi All,

I am newbie to Crunch. Have been playing wit examples in standalone mode.
Was trying to extend the WordCount example, but got stuck.

I want to extend the WordCount example to sort the output by max word
count. I tried using (PCollections.sort)

PTable<String, Long> counts = words.count();
words.sort(false);

This code had no effect. Using crunch-0.4 release (under voting)

Is there a simple way to achieve this, or need to modify the code according
to SecondarySort example.

Already have a blog post based on WordCount, want to extend the same
example for sorting, so that it's easy to understand.

-- 
thanks
ashish

Blog: http://www.ashishpaliwal.com/blog
My Photo Galleries: http://www.pbase.com/ashishpaliwal

Mime
View raw message