org.apache.hadoop.examples
Class AggregateWordHistogram.AggregateWordHistogramPlugin
java.lang.Object
org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorBaseDescriptor
org.apache.hadoop.examples.AggregateWordHistogram.AggregateWordHistogramPlugin
- All Implemented Interfaces:
- ValueAggregatorDescriptor
- Enclosing class:
- AggregateWordHistogram
public static class AggregateWordHistogram.AggregateWordHistogramPlugin
- extends ValueAggregatorBaseDescriptor
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AggregateWordHistogram.AggregateWordHistogramPlugin
public AggregateWordHistogram.AggregateWordHistogramPlugin()
generateKeyValPairs
public ArrayList<Map.Entry<Text,Text>> generateKeyValPairs(Object key,
Object val)
- Parse the given value, generate an aggregation-id/value pair per word.
The ID is of type VALUE_HISTOGRAM, with WORD_HISTOGRAM as the real id.
The value is WORD\t1.
- Specified by:
generateKeyValPairs
in interface ValueAggregatorDescriptor
- Overrides:
generateKeyValPairs
in class ValueAggregatorBaseDescriptor
- Parameters:
key
- input keyval
- input value
- Returns:
- a list of the generated pairs.
Copyright © 2009 The Apache Software Foundation