org.infinispan.demo.mapreduce
Class WordCountCollator

java.lang.Object
  extended by org.infinispan.demo.mapreduce.WordCountCollator
All Implemented Interfaces:
Collator<String,Integer,List<Map.Entry<String,Integer>>>

public class WordCountCollator
extends Object
implements Collator<String,Integer,List<Map.Entry<String,Integer>>>

Collates reduced results by grouping them into the top K most frequent words.

Author:
Vladimir Blagojevic

Constructor Summary
WordCountCollator(int kthFrequentWord)
           
 
Method Summary
 List<Map.Entry<String,Integer>> collate(Map<String,Integer> reducedResults)
          Collates all reduced results and returns R to invoker of distributed task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WordCountCollator

public WordCountCollator(int kthFrequentWord)
Method Detail

collate

public List<Map.Entry<String,Integer>> collate(Map<String,Integer> reducedResults)
Description copied from interface: Collator
Collates all reduced results and returns R to invoker of distributed task.

Specified by:
collate in interface Collator<String,Integer,List<Map.Entry<String,Integer>>>
Returns:
final result of distributed task computation

-->

Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.