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.Writable,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>
| Modifier and Type | Method and Description |
|---|---|
void |
compute(Iterator<M> messages)
The user-defined function
|
List<Edge<V,E>> |
getEdges() |
long |
getNumVertices() |
long |
getSuperstepCount() |
M |
getValue()
Gets the vertex value
|
V |
getVertexID() |
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(org.apache.hadoop.conf.Configuration conf)
Used to setup a vertex.
|
void |
setValue(M value)
Sets the vertex value
|
void |
voteToHalt()
Vote to halt.
|
void setup(org.apache.hadoop.conf.Configuration conf)
V getVertexID()
long getNumVertices()
void compute(Iterator<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
IOExceptionlong getSuperstepCount()
void voteToHalt()
void setValue(M value)
M getValue()
Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.