org.apache.hadoop.examples
Class AggregateWordHistogram.AggregateWordHistogramPlugin

java.lang.Object
  extended by org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorBaseDescriptor
      extended by org.apache.hadoop.examples.AggregateWordHistogram.AggregateWordHistogramPlugin
All Implemented Interfaces:
ValueAggregatorDescriptor
Enclosing class:
AggregateWordHistogram

public static class AggregateWordHistogram.AggregateWordHistogramPlugin
extends ValueAggregatorBaseDescriptor


Field Summary
 
Fields inherited from class org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorBaseDescriptor
DOUBLE_VALUE_SUM, inputFile, LONG_VALUE_MAX, LONG_VALUE_MIN, LONG_VALUE_SUM, STRING_VALUE_MAX, STRING_VALUE_MIN, UNIQ_VALUE_COUNT, VALUE_HISTOGRAM
 
Fields inherited from interface org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorDescriptor
ONE, TYPE_SEPARATOR
 
Constructor Summary
AggregateWordHistogram.AggregateWordHistogramPlugin()
           
 
Method Summary
 ArrayList<Map.Entry<Text,Text>> generateKeyValPairs(Object key, Object val)
          Parse the given value, generate an aggregation-id/value pair per word.
 
Methods inherited from class org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorBaseDescriptor
configure, generateEntry, generateValueAggregator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AggregateWordHistogram.AggregateWordHistogramPlugin

public AggregateWordHistogram.AggregateWordHistogramPlugin()
Method Detail

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 key
val - input value
Returns:
a list of the generated pairs.


Copyright © 2009 The Apache Software Foundation