I
- Vertex idV
- Vertex dataE
- Edge datapublic interface Partition<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable> extends org.apache.hadoop.io.Writable, ImmutableClassesGiraphConfigurable<I,V,E>, Iterable<Vertex<I,V,E>>
Modifier and Type | Method and Description |
---|---|
void |
addPartition(Partition<I,V,E> partition)
Add a partition's vertices.
|
void |
addPartitionVertices(VertexIterator<I,V,E> vertexIterator)
Add vertices to a partition.
|
long |
getEdgeCount()
Get the number of edges in this partition.
|
int |
getId()
Get the partition id.
|
Vertex<I,V,E> |
getVertex(I vertexIndex)
Get the vertex for this vertex index.
|
long |
getVertexCount()
Get the number of vertices in this partition
|
void |
initialize(int partitionId,
org.apache.hadoop.util.Progressable progressable)
Initialize the partition.
|
void |
progress()
Report progress.
|
boolean |
putOrCombine(Vertex<I,V,E> vertex)
Put this vertex or combine it
|
Vertex<I,V,E> |
putVertex(Vertex<I,V,E> vertex)
Put a vertex into the Partition
|
Vertex<I,V,E> |
removeVertex(I vertexIndex)
Remove a vertex from the Partition
|
void |
saveVertex(Vertex<I,V,E> vertex)
Save potentially modified vertex back to the partition.
|
void |
setId(int id)
Set the partition id.
|
void |
setProgressable(org.apache.hadoop.util.Progressable progressable)
Set the context.
|
getConf
setConf
forEach, iterator, spliterator
void initialize(int partitionId, org.apache.hadoop.util.Progressable progressable)
partitionId
- Partition idprogressable
- Progressable to call progressVertex<I,V,E> getVertex(I vertexIndex)
vertexIndex
- Vertex index to search forVertex<I,V,E> putVertex(Vertex<I,V,E> vertex)
vertex
- Vertex to put in the PartitionVertex<I,V,E> removeVertex(I vertexIndex)
vertexIndex
- Vertex index to removevoid addPartition(Partition<I,V,E> partition)
partition
- Partition to addboolean putOrCombine(Vertex<I,V,E> vertex)
vertex
- Vertex to put or combinevoid addPartitionVertices(VertexIterator<I,V,E> vertexIterator)
vertexIterator
- Vertices to addlong getVertexCount()
long getEdgeCount()
int getId()
void setId(int id)
id
- Id of this partitionvoid progress()
void setProgressable(org.apache.hadoop.util.Progressable progressable)
progressable
- ProgressableCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.