I - Vertex id typepublic class OnlyIdVertex<I extends org.apache.hadoop.io.WritableComparable> extends DefaultImmutableClassesGiraphConfigurable<I,org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable> implements Vertex<I,org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>
| Constructor and Description |
|---|
OnlyIdVertex() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEdge(Edge<I,org.apache.hadoop.io.Writable> edge)
Add an edge for this vertex (happens immediately)
|
Iterable<org.apache.hadoop.io.Writable> |
getAllEdgeValues(I targetVertexId)
Get an iterable over the values of all edges with the given target
vertex id.
|
Iterable<Edge<I,org.apache.hadoop.io.Writable>> |
getEdges()
Get a read-only view of the out-edges of this vertex.
|
org.apache.hadoop.io.Writable |
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,org.apache.hadoop.io.Writable>> |
getMutableEdges()
Get an iterable of out-edges that can be modified in-place.
|
int |
getNumEdges()
Get the number of outgoing edges on this vertex.
|
org.apache.hadoop.io.Writable |
getValue()
Get the vertex value (data stored with vertex)
|
void |
initialize(I id,
org.apache.hadoop.io.Writable value)
Initialize id and value.
|
void |
initialize(I id,
org.apache.hadoop.io.Writable value,
Iterable<Edge<I,org.apache.hadoop.io.Writable>> 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,org.apache.hadoop.io.Writable>> edges)
Set the outgoing edges for this vertex.
|
void |
setEdgeValue(I targetVertexId,
org.apache.hadoop.io.Writable edgeValue)
If an edge to the target vertex exists, set it to the given edge value.
|
void |
setId(I id) |
void |
setValue(org.apache.hadoop.io.Writable 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.
|
getConf, setConfclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConfsetConfpublic void initialize(I id, org.apache.hadoop.io.Writable value, Iterable<Edge<I,org.apache.hadoop.io.Writable>> edges)
Vertexinitialize in interface Vertex<I extends org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>id - Vertex idvalue - Vertex valueedges - Iterable of edgespublic void initialize(I id, org.apache.hadoop.io.Writable value)
Vertexinitialize in interface Vertex<I extends org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>id - Vertex idvalue - Vertex valuepublic void setId(I id)
public org.apache.hadoop.io.Writable getValue()
Vertexpublic void setValue(org.apache.hadoop.io.Writable value)
Vertexpublic void voteToHalt()
VertexvoteToHalt in interface Vertex<I extends org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>public int getNumEdges()
VertexgetNumEdges in interface Vertex<I extends org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>public Iterable<Edge<I,org.apache.hadoop.io.Writable>> getEdges()
Vertexpublic void setEdges(Iterable<Edge<I,org.apache.hadoop.io.Writable>> edges)
Vertexpublic Iterable<MutableEdge<I,org.apache.hadoop.io.Writable>> getMutableEdges()
VertexgetMutableEdges in interface Vertex<I extends org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>public org.apache.hadoop.io.Writable getEdgeValue(I targetVertexId)
VertexgetEdgeValue in interface Vertex<I extends org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>targetVertexId - Target vertex idpublic void setEdgeValue(I targetVertexId, org.apache.hadoop.io.Writable edgeValue)
VertexsetEdgeValue in interface Vertex<I extends org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>targetVertexId - Target vertex idedgeValue - Edge valuepublic Iterable<org.apache.hadoop.io.Writable> getAllEdgeValues(I targetVertexId)
VertexgetAllEdgeValues in interface Vertex<I extends org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>targetVertexId - Target vertex idpublic void addEdge(Edge<I,org.apache.hadoop.io.Writable> edge)
Vertexpublic void removeEdges(I targetVertexId)
VertexremoveEdges in interface Vertex<I extends org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>targetVertexId - the target vertex idpublic void unwrapMutableEdges()
VertexMutableEdgesWrapper 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.unwrapMutableEdges in interface Vertex<I extends org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>public void wakeUp()
VertexCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.