public interface AggregatorWriter extends ImmutableClassesGiraphConfigurable
LAST_SUPERSTEP
is
passed to writeAggregator(Iterable, long)
as the
superstep value to signal the end of computation.Modifier and Type | Field and Description |
---|---|
static int |
LAST_SUPERSTEP
Signal for last superstep
|
Modifier and Type | Method and Description |
---|---|
void |
close()
The method is called at the end of a successful computation.
|
void |
initialize(org.apache.hadoop.mapreduce.Mapper.Context context,
long applicationAttempt)
The method is called at the initialization of the AggregatorWriter.
|
void |
writeAggregator(Iterable<Map.Entry<String,org.apache.hadoop.io.Writable>> aggregatorMap,
long superstep)
The method is called at the end of each superstep.
|
getConf
setConf
static final int LAST_SUPERSTEP
void initialize(org.apache.hadoop.mapreduce.Mapper.Context context, long applicationAttempt) throws IOException
context
- Mapper Context where the master is running onapplicationAttempt
- ID of the applicationAttempt, used to
disambiguate aggregator writes for different attemptsIOException
void writeAggregator(Iterable<Map.Entry<String,org.apache.hadoop.io.Writable>> aggregatorMap, long superstep) throws IOException
LAST_SUPERSTEP
is passed.aggregatorMap
- Map from aggregator name to aggregator valuesuperstep
- Current superstepIOException
void close() throws IOException
writeAggregator(Iterable, long)
.IOException
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.