V - Vertex ID object typeE - Edge cost object typeM - Vertex value object typepublic final class MapVerticesInfo<V extends org.apache.hadoop.io.WritableComparable<V>,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable> extends Object implements VerticesInfo<V,E,M>
| Constructor and Description |
|---|
MapVerticesInfo() |
| Modifier and Type | Method and Description |
|---|---|
void |
addVertex(Vertex<V,E,M> vertex)
Add a vertex to the underlying structure.
|
void |
cleanup(HamaConfiguration conf,
TaskAttemptID attempt)
Cleanup of internal structures.
|
void |
clear() |
Vertex<V,E,M> |
deserialize(V vertexID,
byte[] serialized) |
void |
finishAdditions()
Finish the additions, from this point on the implementations should close
the adds and throw exceptions in case something is added after this call.
|
void |
finishRemovals()
Finish the removals, from this point on the implementations should close
the removes and throw exceptions in case something is removed after this call.
|
void |
finishSuperstep()
Called once completed a superstep.
|
void |
finishVertexComputation(Vertex<V,E,M> vertex)
Must be called once a vertex is guaranteed not to change any more and can
safely be persisted to a secondary storage.
|
void |
init(GraphJobRunner<V,E,M> runner,
HamaConfiguration conf,
TaskAttemptID attempt)
Initialization of internal structures.
|
void |
removeVertex(V vertexID)
Remove a vertex to the underlying structure.
|
byte[] |
serialize(Vertex<V,E,M> vertex) |
int |
size() |
IDSkippingIterator<V,E,M> |
skippingIterator() |
void |
startSuperstep()
Called once a superstep starts.
|
public void init(GraphJobRunner<V,E,M> runner, HamaConfiguration conf, TaskAttemptID attempt) throws IOException
VerticesInfoinit in interface VerticesInfo<V extends org.apache.hadoop.io.WritableComparable<V>,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>IOExceptionpublic void addVertex(Vertex<V,E,M> vertex) throws IOException
VerticesInfoaddVertex in interface VerticesInfo<V extends org.apache.hadoop.io.WritableComparable<V>,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>IOExceptionpublic void removeVertex(V vertexID) throws UnsupportedOperationException
VerticesInforemoveVertex in interface VerticesInfo<V extends org.apache.hadoop.io.WritableComparable<V>,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>UnsupportedOperationExceptionpublic void clear()
public int size()
size in interface VerticesInfo<V extends org.apache.hadoop.io.WritableComparable<V>,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>public IDSkippingIterator<V,E,M> skippingIterator()
skippingIterator in interface VerticesInfo<V extends org.apache.hadoop.io.WritableComparable<V>,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>public byte[] serialize(Vertex<V,E,M> vertex) throws IOException
IOExceptionpublic Vertex<V,E,M> deserialize(V vertexID, byte[] serialized) throws IOException
IOExceptionpublic void finishVertexComputation(Vertex<V,E,M> vertex) throws IOException
VerticesInfofinishVertexComputation in interface VerticesInfo<V extends org.apache.hadoop.io.WritableComparable<V>,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>IOExceptionpublic void finishAdditions()
VerticesInfofinishAdditions in interface VerticesInfo<V extends org.apache.hadoop.io.WritableComparable<V>,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>public void finishRemovals()
VerticesInfofinishRemovals in interface VerticesInfo<V extends org.apache.hadoop.io.WritableComparable<V>,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>public void finishSuperstep()
VerticesInfofinishSuperstep in interface VerticesInfo<V extends org.apache.hadoop.io.WritableComparable<V>,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>public void cleanup(HamaConfiguration conf, TaskAttemptID attempt) throws IOException
VerticesInfocleanup in interface VerticesInfo<V extends org.apache.hadoop.io.WritableComparable<V>,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>IOExceptionpublic void startSuperstep()
throws IOException
VerticesInfostartSuperstep in interface VerticesInfo<V extends org.apache.hadoop.io.WritableComparable<V>,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>IOExceptionCopyright © 2008-2014 The Apache Software Foundation. All Rights Reserved.