public abstract class Vertex<V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable> extends Object implements VertexInterface<V,E,M>
| Modifier and Type | Field and Description |
|---|---|
protected GraphJobRunner<V,E,M> |
runner |
| Constructor and Description |
|---|
Vertex() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEdge(Edge<V,E> edge) |
boolean |
equals(Object obj) |
org.apache.hadoop.conf.Configuration |
getConf() |
List<Edge<V,E>> |
getEdges() |
M |
getLastAggregatedValue(int index)
Get the last aggregated value of the defined aggregator, null if nothing
was configured or not returned a result.
|
int |
getMaxIteration() |
org.apache.hadoop.io.IntWritable |
getNumLastAggregatedVertices(int index)
Get the number of aggregated vertices in the last superstep.
|
int |
getNumPeers() |
long |
getNumVertices() |
Partitioner<V,M> |
getPartitioner() |
BSPPeer<org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable,GraphJobMessage> |
getPeer()
Gives access to the BSP primitives and additional features by a peer.
|
long |
getSuperstepCount() |
M |
getValue()
Gets the vertex value
|
V |
getVertexID() |
int |
hashCode() |
boolean |
isHalted() |
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 |
setEdges(List<Edge<V,E>> list) |
void |
setup(org.apache.hadoop.conf.Configuration conf)
Used to setup a vertex.
|
void |
setValue(M value)
Sets the vertex value
|
void |
setVertexID(V vertexID) |
String |
toString() |
void |
voteToHalt()
Vote to halt.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcomputeprotected GraphJobRunner<V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable> runner
public org.apache.hadoop.conf.Configuration getConf()
public V getVertexID()
getVertexID in interface VertexInterface<V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>public void setup(org.apache.hadoop.conf.Configuration conf)
VertexInterfacesetup in interface VertexInterface<V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>public void sendMessage(Edge<V,E> e, M msg) throws IOException
VertexInterfacesendMessage in interface VertexInterface<V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>IOExceptionpublic void sendMessageToNeighbors(M msg) throws IOException
VertexInterfacesendMessageToNeighbors in interface VertexInterface<V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>IOExceptionpublic void sendMessage(V destinationVertexID, M msg) throws IOException
VertexInterfacesendMessage in interface VertexInterface<V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>IOExceptionpublic long getSuperstepCount()
getSuperstepCount in interface VertexInterface<V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>public List<Edge<V,E>> getEdges()
getEdges in interface VertexInterface<V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>public M getValue()
VertexInterfacegetValue in interface VertexInterface<V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>public void setValue(M value)
VertexInterfacesetValue in interface VertexInterface<V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>public void setVertexID(V vertexID)
public int getMaxIteration()
public M getLastAggregatedValue(int index)
GraphJob.setAggregatorClass(Class...). Index is starting at zero,
so if you have a single aggregator you can retrieve it via
getLastAggregatedValue(int)(0).public org.apache.hadoop.io.IntWritable getNumLastAggregatedVertices(int index)
GraphJob.setAggregatorClass(Class...). Index is starting at zero,
so if you have a single aggregator you can retrieve it via
getNumLastAggregatedVertices(int)(0).public int getNumPeers()
public BSPPeer<org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable,GraphJobMessage> getPeer()
public Partitioner<V,M> getPartitioner()
public long getNumVertices()
getNumVertices in interface VertexInterface<V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>public void voteToHalt()
VertexInterfacevoteToHalt in interface VertexInterface<V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>public boolean isHalted()
Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.