I - Vertex idV - Vertex dataE - Edge data@ThreadSafe public class SimplePartition<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable> extends BasicPartition<I,V,E>
| Constructor and Description | 
|---|
| SimplePartition()Constructor for reflection. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addPartition(Partition<I,V,E> partition)Add a partition's vertices. | 
| long | getEdgeCount()Get the number of edges in this partition. | 
| 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. | 
| Iterator<Vertex<I,V,E>> | iterator() | 
| 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 | 
| void | readFields(DataInput input) | 
| 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. | 
| String | toString() | 
| void | write(DataOutput output) | 
addPartitionVertices, getConf, getId, getVertexValueCombiner, progress, setConf, setId, setProgressableclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic void initialize(int partitionId,
                       org.apache.hadoop.util.Progressable progressable)
Partitioninitialize in interface Partition<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>initialize in class BasicPartition<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>partitionId - Partition idprogressable - Progressable to call progresspublic Vertex<I,V,E> getVertex(I vertexIndex)
PartitionvertexIndex - Vertex index to search forpublic Vertex<I,V,E> putVertex(Vertex<I,V,E> vertex)
Partitionvertex - Vertex to put in the Partitionpublic Vertex<I,V,E> removeVertex(I vertexIndex)
PartitionvertexIndex - Vertex index to removepublic boolean putOrCombine(Vertex<I,V,E> vertex)
Partitionvertex - Vertex to put or combinepublic void addPartition(Partition<I,V,E> partition)
Partitionpartition - Partition to addpublic long getVertexCount()
Partitionpublic long getEdgeCount()
Partitionpublic void saveVertex(Vertex<I,V,E> vertex)
Partitionvertex - Vertex to savepublic void readFields(DataInput input) throws IOException
readFields in interface org.apache.hadoop.io.WritablereadFields in class BasicPartition<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>IOExceptionpublic void write(DataOutput output) throws IOException
write in interface org.apache.hadoop.io.Writablewrite in class BasicPartition<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>IOExceptionCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.