S
- Single value type, objects passed on workersR
- Reduced value typepublic interface ReduceOperation<S,R extends org.apache.hadoop.io.Writable>
extends org.apache.hadoop.io.Writable
AggregatorReduceOperation
),
i.e. stores reusable object inside, accesses should be synchronized.Modifier and Type | Method and Description |
---|---|
R |
createInitialValue()
Return new reduced value which is neutral to reduce operation.
|
R |
reduce(R curValue,
S valueToReduce)
Add a new value.
|
R |
reduceMerge(R curValue,
R valueToReduce)
Add partially reduced value to current partially reduced value.
|
R createInitialValue()
R reduce(R curValue, S valueToReduce)
curValue
- Partial value into which to reduce and store the resultvalueToReduce
- Single value to be reducedR reduceMerge(R curValue, R valueToReduce)
curValue
- Partial value into which to reduce and store the resultvalueToReduce
- Partial value to be reducedCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.