I
- Vertex idE
- Edge datapublic class WrappedEdgeReader<I extends org.apache.hadoop.io.WritableComparable,E extends org.apache.hadoop.io.Writable> extends EdgeReader<I,E>
EdgeReader
to make sure proper configuration
parameters are passed around, that parameters set in original
configuration are available in methods of this readerConstructor and Description |
---|
WrappedEdgeReader(EdgeReader<I,E> baseEdgeReader,
ImmutableClassesGiraphConfiguration<I,org.apache.hadoop.io.Writable,E> conf)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this
EdgeReader to future operations. |
Edge<I,E> |
getCurrentEdge()
Get the current edge.
|
I |
getCurrentSourceId()
Get the current edge source id.
|
float |
getProgress()
How much of the input has the
EdgeReader consumed i.e. |
void |
initialize(org.apache.hadoop.mapreduce.InputSplit inputSplit,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
Use the input split and context to setup reading the edges.
|
boolean |
nextEdge()
Read the next edge.
|
void |
setConf(ImmutableClassesGiraphConfiguration<I,org.apache.hadoop.io.Writable,E> conf)
Set the configuration to be used by this object.
|
void |
setWorkerGlobalCommUsage(WorkerGlobalCommUsage usage)
Set worker global communication usage
|
aggregate, getAggregatedValue, getBroadcast, reduce, reduceMerge
getConf
public WrappedEdgeReader(EdgeReader<I,E> baseEdgeReader, ImmutableClassesGiraphConfiguration<I,org.apache.hadoop.io.Writable,E> conf)
baseEdgeReader
- EdgeReader to delegate all the methods toconf
- Configurationpublic void setConf(ImmutableClassesGiraphConfiguration<I,org.apache.hadoop.io.Writable,E> conf)
GiraphConfigurationSettable
setConf
in interface GiraphConfigurationSettable<I extends org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
setConf
in class DefaultImmutableClassesGiraphConfigurable<I extends org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
conf
- Set configurationpublic void initialize(org.apache.hadoop.mapreduce.InputSplit inputSplit, org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException, InterruptedException
EdgeReader
initialize
in class EdgeReader<I extends org.apache.hadoop.io.WritableComparable,E extends org.apache.hadoop.io.Writable>
inputSplit
- Input split to be used for reading edges.context
- Context from the task.IOException
InterruptedException
public void setWorkerGlobalCommUsage(WorkerGlobalCommUsage usage)
WorkerAggregatorDelegator
setWorkerGlobalCommUsage
in class WorkerAggregatorDelegator<I extends org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
usage
- Worker global communication usagepublic boolean nextEdge() throws IOException, InterruptedException
EdgeReader
nextEdge
in class EdgeReader<I extends org.apache.hadoop.io.WritableComparable,E extends org.apache.hadoop.io.Writable>
IOException
InterruptedException
public I getCurrentSourceId() throws IOException, InterruptedException
EdgeReader
getCurrentSourceId
in class EdgeReader<I extends org.apache.hadoop.io.WritableComparable,E extends org.apache.hadoop.io.Writable>
IOException
InterruptedException
public Edge<I,E> getCurrentEdge() throws IOException, InterruptedException
EdgeReader
getCurrentEdge
in class EdgeReader<I extends org.apache.hadoop.io.WritableComparable,E extends org.apache.hadoop.io.Writable>
IOException
InterruptedException
public void close() throws IOException
EdgeReader
EdgeReader
to future operations.close
in class EdgeReader<I extends org.apache.hadoop.io.WritableComparable,E extends org.apache.hadoop.io.Writable>
IOException
public float getProgress() throws IOException, InterruptedException
EdgeReader
EdgeReader
consumed i.e.
has been processed by?getProgress
in class EdgeReader<I extends org.apache.hadoop.io.WritableComparable,E extends org.apache.hadoop.io.Writable>
0.0
to 1.0
.IOException
InterruptedException
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.