V - this type must be writable and should also implement equals and
hashcode.E - the type used for storing edge values, usually the value of an
edge.M - the type used for messaging, usually the value of a vertex.public interface VertexInterface<V extends org.apache.hadoop.io.WritableComparable,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable> extends org.apache.hadoop.io.WritableComparable<VertexInterface<V,E,M>>
| Modifier and Type | Method and Description |
|---|---|
void |
addVertex(V vertexID,
List<Edge<V,E>> edges,
M value)
Sends a message to add a new vertex through the partitioner to the
appropriate BSP peer
|
void |
aggregate(int index,
M value)
Provides a value to the specified aggregator.
|
void |
compute(Iterable<M> messages)
The user-defined function
|
org.apache.hadoop.io.Writable |
getAggregatedValue(int index)
Returns the value of the specified aggregator.
|
List<Edge<V,E>> |
getEdges() |
long |
getNumVertices() |
long |
getSuperstepCount() |
M |
getValue()
Gets the vertex value
|
V |
getVertexID() |
void |
remove()
Removes current Vertex from local peer.
|
void |
sendMessage(Edge<V,E> e,
M msg)
Sends a message to another vertex.
|
void |
sendMessage(V destinationVertexID,
M msg)
Sends a message to the given destination vertex by ID and the message value
|
void |
sendMessageToNeighbors(M msg)
Sends a message to neighbors
|
void |
setup(HamaConfiguration conf)
This method is called once before the Vertex computation begins.
|
void |
setValue(M value)
Sets the vertex value
|
void |
voteToHalt()
Vote to halt.
|
compareTovoid setup(HamaConfiguration conf)
V getVertexID()
long getNumVertices()
void compute(Iterable<M> messages) throws IOException
IOExceptionList<Edge<V,E>> getEdges()
void sendMessage(Edge<V,E> e, M msg) throws IOException
IOExceptionvoid sendMessageToNeighbors(M msg) throws IOException
IOExceptionvoid sendMessage(V destinationVertexID, M msg) throws IOException
IOExceptionvoid addVertex(V vertexID, List<Edge<V,E>> edges, M value) throws IOException
IOExceptionvoid remove()
throws IOException
IOExceptionlong getSuperstepCount()
void voteToHalt()
void setValue(M value)
M getValue()
void aggregate(int index,
M value)
throws IOException
name - identifies a aggregatorvalue - value to be aggregatedIOExceptionorg.apache.hadoop.io.Writable getAggregatedValue(int index)
Copyright © 2008-2014 The Apache Software Foundation. All Rights Reserved.