public abstract class ComponentAggregatorAbstract
extends java.lang.Object
implements org.apache.giraph.aggregators.Aggregator<org.apache.hadoop.io.MapWritable>
Modifier and Type | Class and Description |
---|---|
static class |
ComponentAggregatorAbstract.ComponentFloatXYMaxAggregator
This aggregator keeps the maximum float coordinates (float[]{x,y}) for each key.
|
static class |
ComponentAggregatorAbstract.ComponentFloatXYMinAggregator
This aggregator keeps the minimum float coordinates (float[]{x,y}) for each key.
|
static class |
ComponentAggregatorAbstract.ComponentIntSumAggregator
This aggregator sums up integer values with the same key.
|
static class |
ComponentAggregatorAbstract.ComponentMapOverwriteAggregator
This aggregator stores a value for each key until another value with same key is aggregated.
|
Modifier and Type | Field and Description |
---|---|
protected org.apache.hadoop.io.MapWritable |
internalState |
Constructor and Description |
---|
ComponentAggregatorAbstract() |
Modifier and Type | Method and Description |
---|---|
void |
aggregate(org.apache.hadoop.io.MapWritable in) |
org.apache.hadoop.io.MapWritable |
createInitialValue() |
org.apache.hadoop.io.MapWritable |
getAggregatedValue() |
void |
reset() |
void |
setAggregatedValue(org.apache.hadoop.io.MapWritable in) |
protected abstract void |
specificAggregate(java.util.Map.Entry<org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable> current)
This method must be overridden in order to subclass ComponentAggregatorAbstract.
|
public void aggregate(org.apache.hadoop.io.MapWritable in)
aggregate
in interface org.apache.giraph.aggregators.Aggregator<org.apache.hadoop.io.MapWritable>
public org.apache.hadoop.io.MapWritable createInitialValue()
createInitialValue
in interface org.apache.giraph.aggregators.Aggregator<org.apache.hadoop.io.MapWritable>
public org.apache.hadoop.io.MapWritable getAggregatedValue()
getAggregatedValue
in interface org.apache.giraph.aggregators.Aggregator<org.apache.hadoop.io.MapWritable>
public void reset()
reset
in interface org.apache.giraph.aggregators.Aggregator<org.apache.hadoop.io.MapWritable>
public void setAggregatedValue(org.apache.hadoop.io.MapWritable in)
setAggregatedValue
in interface org.apache.giraph.aggregators.Aggregator<org.apache.hadoop.io.MapWritable>
protected abstract void specificAggregate(java.util.Map.Entry<org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable> current)
current
- A java.util.map.Entry