public class AggregatorToGlobalCommTranslation extends Object implements MasterAggregatorUsage, org.apache.hadoop.io.Writable
Constructor and Description |
---|
AggregatorToGlobalCommTranslation(ImmutableClassesGiraphConfiguration<?,?,?> conf,
MasterGlobalCommUsage globalComm)
Constructor
|
Modifier and Type | Method and Description |
---|---|
<A extends org.apache.hadoop.io.Writable> |
getAggregatedValue(String name)
Get value of an aggregator.
|
void |
postMasterCompute()
Called after master compute, to do aggregator->reduce/broadcast
translation
|
void |
prepareSuperstep()
Prepare before calling master compute
|
void |
readFields(DataInput in) |
<A extends org.apache.hadoop.io.Writable> |
registerAggregator(String name,
Class<? extends Aggregator<A>> aggregatorClass)
Register an aggregator in preSuperstep() and/or preApplication().
|
<A extends org.apache.hadoop.io.Writable> |
registerPersistentAggregator(String name,
Class<? extends Aggregator<A>> aggregatorClass)
Register persistent aggregator in preSuperstep() and/or
preApplication().
|
<A extends org.apache.hadoop.io.Writable> |
setAggregatedValue(String name,
A value)
Sets value of an aggregator.
|
void |
write(DataOutput out) |
public AggregatorToGlobalCommTranslation(ImmutableClassesGiraphConfiguration<?,?,?> conf, MasterGlobalCommUsage globalComm)
conf
- ConfigurationglobalComm
- Global communication interfacepublic <A extends org.apache.hadoop.io.Writable> A getAggregatedValue(String name)
AggregatorUsage
getAggregatedValue
in interface AggregatorUsage
A
- Aggregated valuename
- Name of aggregatorpublic <A extends org.apache.hadoop.io.Writable> void setAggregatedValue(String name, A value)
MasterAggregatorUsage
setAggregatedValue
in interface MasterAggregatorUsage
A
- Aggregated valuename
- Name of aggregatorvalue
- Value to setpublic void postMasterCompute()
public void prepareSuperstep()
public <A extends org.apache.hadoop.io.Writable> boolean registerAggregator(String name, Class<? extends Aggregator<A>> aggregatorClass) throws InstantiationException, IllegalAccessException
MasterAggregatorUsage
registerAggregator
in interface MasterAggregatorUsage
A
- Aggregator typename
- of aggregatoraggregatorClass
- Class type of the aggregatorInstantiationException
IllegalAccessException
public <A extends org.apache.hadoop.io.Writable> boolean registerPersistentAggregator(String name, Class<? extends Aggregator<A>> aggregatorClass) throws InstantiationException, IllegalAccessException
MasterAggregatorUsage
registerPersistentAggregator
in interface MasterAggregatorUsage
A
- Aggregator typename
- of aggregatoraggregatorClass
- Class type of the aggregatorInstantiationException
IllegalAccessException
public 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.