I - Vertex idV - Vertex dataE - Edge datapublic interface Vertex<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable> extends ImmutableClassesGiraphConfigurable<I,V,E>
| Modifier and Type | Method and Description |
|---|---|
void |
addEdge(Edge<I,E> edge)
Add an edge for this vertex (happens immediately)
|
Iterable<E> |
getAllEdgeValues(I targetVertexId)
Get an iterable over the values of all edges with the given target
vertex id.
|
Iterable<Edge<I,E>> |
getEdges()
Get a read-only view of the out-edges of this vertex.
|
E |
getEdgeValue(I targetVertexId)
Return the value of the first edge with the given target vertex id,
or null if there is no such edge.
|
I |
getId()
Get the vertex id.
|
Iterable<MutableEdge<I,E>> |
getMutableEdges()
Get an iterable of out-edges that can be modified in-place.
|
int |
getNumEdges()
Get the number of outgoing edges on this vertex.
|
V |
getValue()
Get the vertex value (data stored with vertex)
|
void |
initialize(I id,
V value)
Initialize id and value.
|
void |
initialize(I id,
V value,
Iterable<Edge<I,E>> edges)
Initialize id, value, and edges.
|
boolean |
isHalted()
Is this vertex done?
|
void |
removeEdges(I targetVertexId)
Removes all edges pointing to the given vertex id.
|
void |
setEdges(Iterable<Edge<I,E>> edges)
Set the outgoing edges for this vertex.
|
void |
setEdgeValue(I targetVertexId,
E edgeValue)
If an edge to the target vertex exists, set it to the given edge value.
|
void |
setValue(V value)
Set the vertex data (immediately visible in the computation)
|
void |
unwrapMutableEdges()
If a
MutableEdgesWrapper was used to
provide a mutable iterator, copy any remaining edges to the new
OutEdges data structure and keep a direct
reference to it (thus discarding the wrapper). |
void |
voteToHalt()
After this is called, the compute() code will no longer be called for
this vertex unless a message is sent to it.
|
void |
wakeUp()
Re-activate vertex if halted.
|
getConfsetConfvoid initialize(I id, V value, Iterable<Edge<I,E>> edges)
id - Vertex idvalue - Vertex valueedges - Iterable of edgesvoid initialize(I id, V value)
id - Vertex idvalue - Vertex valueI getId()
V getValue()
void setValue(V value)
value - Vertex data to be setvoid voteToHalt()
int getNumEdges()
Iterable<Edge<I,E>> getEdges()
void setEdges(Iterable<Edge<I,E>> edges)
edges - Iterable of edgesIterable<MutableEdge<I,E>> getMutableEdges()
E getEdgeValue(I targetVertexId)
targetVertexId - Target vertex idvoid setEdgeValue(I targetVertexId, E edgeValue)
targetVertexId - Target vertex idedgeValue - Edge valueIterable<E> getAllEdgeValues(I targetVertexId)
targetVertexId - Target vertex idvoid addEdge(Edge<I,E> edge)
edge - Edge to addvoid removeEdges(I targetVertexId)
targetVertexId - the target vertex idvoid unwrapMutableEdges()
MutableEdgesWrapper was used to
provide a mutable iterator, copy any remaining edges to the new
OutEdges data structure and keep a direct
reference to it (thus discarding the wrapper).
Called by the Giraph infrastructure after computation.void wakeUp()
boolean isHalted()
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.