I - Vertex index valueV - Vertex valueE - Edge value@NotThreadSafe public class ByteArrayPartition<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> implements ReusesObjectsPartition<I,V,E>
| Constructor and Description | 
|---|
| ByteArrayPartition()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. | 
| void | write(DataOutput output) | 
addPartitionVertices, getConf, getId, getVertexValueCombiner, progress, setConf, setId, setProgressableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddPartitionVertices, getId, progress, setId, setProgressablegetConfsetConfforEach, 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)
Partitionpublic Vertex<I,V,E> putVertex(Vertex<I,V,E> vertex)
Partitionpublic Vertex<I,V,E> removeVertex(I vertexIndex)
PartitionremoveVertex in interface Partition<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>vertexIndex - Vertex index to removepublic void addPartition(Partition<I,V,E> partition)
PartitionaddPartition in interface Partition<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>partition - Partition to addpublic boolean putOrCombine(Vertex<I,V,E> vertex)
PartitionputOrCombine in interface Partition<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>vertex - Vertex to put or combinepublic long getVertexCount()
PartitiongetVertexCount in interface Partition<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>public long getEdgeCount()
PartitiongetEdgeCount in interface Partition<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>public void saveVertex(Vertex<I,V,E> vertex)
PartitionsaveVertex in interface Partition<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>vertex - Vertex to savepublic 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>IOExceptionpublic 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>IOExceptionCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.