org.infinispan.demo.mapreduce
Class WordCountCollator
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WordCountCollator
public WordCountCollator(int kthFrequentWord)
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.