hi i wanted to learn how to sort the word count by value in hadoop.i know hadoop takes of sorting keys, but not by values.
i know to sort the values we must have a partitioner,groupingcomparator and a sortcomparator
but i am bit confused in applying these concepts together to sort the word count by value.
do we need another map reduce job to achieve the same or else a combiner to count the occurrences and then sort here and emit the same to reducer?
can any one explain how to sort word count example by values?
You need to have a second mapreduce job. Unless you conclude on the the totals counts (which the first MR job does) how can you think of sorting by value (the counts of the words)? Logically not possible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With