datafu.hourglass.mapreduce
Class PartitioningCombiner
java.lang.Object
datafu.hourglass.mapreduce.ObjectProcessor
datafu.hourglass.mapreduce.ObjectReducer
datafu.hourglass.mapreduce.PartitioningCombiner
- All Implemented Interfaces:
- java.io.Serializable
public class PartitioningCombiner
- extends ObjectReducer
- implements java.io.Serializable
The combiner used by AbstractPartitionPreservingIncrementalJob
and its derived classes.
An implementation of Accumulator
is used to perform aggregation and produce the
intermediate value.
- Author:
- "Matthew Hayes"
- See Also:
- Serialized Form
Method Summary |
Accumulator<org.apache.avro.generic.GenericRecord,org.apache.avro.generic.GenericRecord> |
getAccumulator()
Gets the accumulator used to perform aggregation. |
void |
reduce(java.lang.Object keyObj,
java.lang.Iterable<java.lang.Object> values,
org.apache.hadoop.mapreduce.ReduceContext<java.lang.Object,java.lang.Object,java.lang.Object,java.lang.Object> context)
|
void |
setAccumulator(Accumulator<org.apache.avro.generic.GenericRecord,org.apache.avro.generic.GenericRecord> acc)
Sets the accumulator used to perform aggregation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PartitioningCombiner
public PartitioningCombiner()
reduce
public void reduce(java.lang.Object keyObj,
java.lang.Iterable<java.lang.Object> values,
org.apache.hadoop.mapreduce.ReduceContext<java.lang.Object,java.lang.Object,java.lang.Object,java.lang.Object> context)
throws java.io.IOException,
java.lang.InterruptedException
- Specified by:
reduce
in class ObjectReducer
- Throws:
java.io.IOException
java.lang.InterruptedException
getAccumulator
public Accumulator<org.apache.avro.generic.GenericRecord,org.apache.avro.generic.GenericRecord> getAccumulator()
- Gets the accumulator used to perform aggregation.
- Returns:
- The accumulator
setAccumulator
public void setAccumulator(Accumulator<org.apache.avro.generic.GenericRecord,org.apache.avro.generic.GenericRecord> acc)
- Sets the accumulator used to perform aggregation.
- Parameters:
acc
- The accumulator
Matthew Hayes