I
- Vertex idV
- Vertex dataE
- Edge datapublic class WrappedVertexReader<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable> extends VertexReader<I,V,E>
VertexReader
to make sure proper configuration
parameters are passed around, that parameters set in original
configuration are available in methods of this readerConstructor and Description |
---|
WrappedVertexReader(VertexReader<I,V,E> baseVertexReader,
ImmutableClassesGiraphConfiguration<I,V,E> conf)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this
VertexReader to future operations. |
Vertex<I,V,E> |
getCurrentVertex()
Get the current vertex.
|
float |
getProgress()
How much of the input has the
VertexReader 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 vertices.
|
boolean |
nextVertex() |
void |
setConf(ImmutableClassesGiraphConfiguration<I,V,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 WrappedVertexReader(VertexReader<I,V,E> baseVertexReader, ImmutableClassesGiraphConfiguration<I,V,E> conf)
baseVertexReader
- VertexReader to delegate all the methods toconf
- Configurationpublic void setConf(ImmutableClassesGiraphConfiguration<I,V,E> conf)
GiraphConfigurationSettable
setConf
in interface GiraphConfigurationSettable<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
setConf
in class DefaultImmutableClassesGiraphConfigurable<I extends org.apache.hadoop.io.WritableComparable,V extends 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
VertexReader
initialize
in class VertexReader<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
inputSplit
- Input split to be used for reading vertices.context
- Context from the task.IOException
InterruptedException
public void setWorkerGlobalCommUsage(WorkerGlobalCommUsage usage)
WorkerAggregatorDelegator
setWorkerGlobalCommUsage
in class WorkerAggregatorDelegator<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
usage
- Worker global communication usagepublic boolean nextVertex() throws IOException, InterruptedException
nextVertex
in class VertexReader<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
IOException
InterruptedException
public Vertex<I,V,E> getCurrentVertex() throws IOException, InterruptedException
VertexReader
getCurrentVertex
in class VertexReader<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
IOException
InterruptedException
public void close() throws IOException
VertexReader
VertexReader
to future operations.close
in class VertexReader<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
IOException
public float getProgress() throws IOException, InterruptedException
VertexReader
VertexReader
consumed i.e.
has been processed by?getProgress
in class VertexReader<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
0.0
to 1.0
.IOException
InterruptedException
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.