A
- Aggregation object typepublic class AggregatorReduceOperation<A extends org.apache.hadoop.io.Writable> extends ReduceSameTypeOperation<A> implements GiraphConfigurationSettable
Constructor and Description |
---|
AggregatorReduceOperation()
Constructor
|
AggregatorReduceOperation(Class<? extends Aggregator<A>> aggregatorClass,
ImmutableClassesGiraphConfiguration<?,?,?> conf)
Constructor
|
Modifier and Type | Method and Description |
---|---|
AggregatorReduceOperation<A> |
createCopy()
Creates copy of this object
|
A |
createInitialValue()
Return new reduced value which is neutral to reduce operation.
|
Class<? extends Aggregator<A>> |
getAggregatorClass() |
void |
readFields(DataInput in) |
A |
reduce(A curValue,
A valueToReduce)
Add a new value.
|
void |
setConf(ImmutableClassesGiraphConfiguration conf)
Set the configuration to be used by this object.
|
void |
write(DataOutput out) |
reduceMerge
public AggregatorReduceOperation()
public AggregatorReduceOperation(Class<? extends Aggregator<A>> aggregatorClass, ImmutableClassesGiraphConfiguration<?,?,?> conf)
aggregatorClass
- Aggregator classconf
- Configurationpublic A createInitialValue()
ReduceOperation
createInitialValue
in interface ReduceOperation<A extends org.apache.hadoop.io.Writable,A extends org.apache.hadoop.io.Writable>
public AggregatorReduceOperation<A> createCopy()
public Class<? extends Aggregator<A>> getAggregatorClass()
public A reduce(A curValue, A valueToReduce)
ReduceOperation
reduce
in interface ReduceOperation<A extends org.apache.hadoop.io.Writable,A extends org.apache.hadoop.io.Writable>
curValue
- Partial value into which to reduce and store the resultvalueToReduce
- Single value to be reducedpublic void setConf(ImmutableClassesGiraphConfiguration conf)
GiraphConfigurationSettable
setConf
in interface GiraphConfigurationSettable
conf
- Set configurationpublic void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.