public class PartitioningCombiner extends ObjectReducer implements java.io.Serializable
AbstractPartitionPreservingIncrementalJob
and its derived classes.
An implementation of Accumulator
is used to perform aggregation and produce the
intermediate value.
Constructor and Description |
---|
PartitioningCombiner() |
Modifier and Type | Method and Description |
---|---|
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.
|
close, getContext, setContext
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
reduce
in class ObjectReducer
java.io.IOException
java.lang.InterruptedException
public Accumulator<org.apache.avro.generic.GenericRecord,org.apache.avro.generic.GenericRecord> getAccumulator()
public void setAccumulator(Accumulator<org.apache.avro.generic.GenericRecord,org.apache.avro.generic.GenericRecord> acc)
acc
- The accumulator