org.apache.hadoop.mapreduce.lib.aggregate
Class ValueAggregatorCombiner<K1 extends org.apache.hadoop.io.WritableComparable<?>,V1 extends org.apache.hadoop.io.Writable>

java.lang.Object
  extended by org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
      extended by org.apache.hadoop.mapreduce.lib.aggregate.ValueAggregatorCombiner<K1,V1>

@InterfaceAudience.Public
@InterfaceStability.Stable
public class ValueAggregatorCombiner<K1 extends org.apache.hadoop.io.WritableComparable<?>,V1 extends org.apache.hadoop.io.Writable>
extends Reducer<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>

This class implements the generic combiner of Aggregate.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Reducer
Reducer.Context
 
Constructor Summary
ValueAggregatorCombiner()
           
 
Method Summary
 void reduce(org.apache.hadoop.io.Text key, Iterable<org.apache.hadoop.io.Text> values, Reducer.Context context)
          Combines values for a given key.
 
Methods inherited from class org.apache.hadoop.mapreduce.Reducer
cleanup, run, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueAggregatorCombiner

public ValueAggregatorCombiner()
Method Detail

reduce

public void reduce(org.apache.hadoop.io.Text key,
                   Iterable<org.apache.hadoop.io.Text> values,
                   Reducer.Context context)
            throws IOException,
                   InterruptedException
Combines values for a given key.

Overrides:
reduce in class Reducer<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
Parameters:
key - the key is expected to be a Text object, whose prefix indicates the type of aggregation to aggregate the values.
values - the values to combine
context - to collect combined values
Throws:
IOException
InterruptedException


Copyright © 2012 Apache Software Foundation. All Rights Reserved.