com.bigdata.service.mapred.tasks
Class CountKeywords
java.lang.Object
com.bigdata.service.mapred.AbstractReduceTask
com.bigdata.service.mapred.tasks.CountKeywords
- All Implemented Interfaces:
- IReduceTask, ITask, Serializable
public class CountKeywords
- extends AbstractReduceTask
Summarizes tuples of the form {key, term}.
Note that many terms may be conflated into the same Unicode sort key
depending on the collator that you are using. This task just deserializes
the 1st term entry for each distinct key. If you want some consistency in
the reported terms, then you should normalize the terms in your map task.
- Version:
- $Id: CountKeywords.java 2265 2009-10-26 12:51:06Z thompsonbry $
- Author:
- Bryan Thompson
- See Also:
ExtractKeywords,
Serialized Form
|
Method Summary |
void |
reduce(byte[] key,
Iterator<byte[]> vals)
Each reduce task will be presented with a series of key-value pairs
in key order. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CountKeywords
public CountKeywords(UUID uuid,
UUID dataService)
reduce
public void reduce(byte[] key,
Iterator<byte[]> vals)
throws Exception
- Description copied from interface:
IReduceTask
- Each reduce task will be presented with a series of key-value pairs
in key order. However, the keys will be distributed across the N
reduce tasks by the used defined hash function, so this is NOT a
total ordering over the intermediate keys.
Note: This method is never invoked for a key for which there are no
values.
- Parameters:
key - A key.vals - An iterator that will visit the set of values for that
key.
- Throws:
Exception
Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.