S
- Single value typeR
- Reduced value typepublic abstract class KryoWrappedReduceOperation<S,R> extends Object implements ReduceOperation<S,KryoWritableWrapper<R>>
Constructor and Description |
---|
KryoWrappedReduceOperation() |
Modifier and Type | Method and Description |
---|---|
KryoWritableWrapper<R> |
createInitialValue()
Return new reduced value which is neutral to reduce operation.
|
abstract R |
createValue()
Look at ReduceOperation.createValue.
|
void |
readFields(DataInput dataInput) |
KryoWritableWrapper<R> |
reduce(KryoWritableWrapper<R> wrapper,
S value)
Add a new value.
|
abstract void |
reduce(R reduceInto,
S valueToReduce)
Look at ReduceOperation.reduce.
|
KryoWritableWrapper<R> |
reduceMerge(KryoWritableWrapper<R> wrapper,
KryoWritableWrapper<R> wrapperToReduce)
Add partially reduced value to current partially reduced value.
|
abstract void |
reduceMerge(R reduceInto,
R valueToReduce)
Look at ReduceOperation.reduceMerge.
|
void |
write(DataOutput dataOutput) |
public abstract void reduce(R reduceInto, S valueToReduce)
reduceInto
- Partial value into which to reduce and store the resultvalueToReduce
- Single value to be reducedpublic abstract void reduceMerge(R reduceInto, R valueToReduce)
reduceInto
- Partial value into which to reduce and store the resultvalueToReduce
- Partial value to be reducedpublic abstract R createValue()
public final KryoWritableWrapper<R> createInitialValue()
ReduceOperation
createInitialValue
in interface ReduceOperation<S,KryoWritableWrapper<R>>
public final KryoWritableWrapper<R> reduce(KryoWritableWrapper<R> wrapper, S value)
ReduceOperation
reduce
in interface ReduceOperation<S,KryoWritableWrapper<R>>
wrapper
- Partial value into which to reduce and store the resultvalue
- Single value to be reducedpublic final KryoWritableWrapper<R> reduceMerge(KryoWritableWrapper<R> wrapper, KryoWritableWrapper<R> wrapperToReduce)
ReduceOperation
reduceMerge
in interface ReduceOperation<S,KryoWritableWrapper<R>>
wrapper
- Partial value into which to reduce and store the resultwrapperToReduce
- Partial value to be reducedpublic void write(DataOutput dataOutput) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public void readFields(DataInput dataInput) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.