I - vertexId type parameterT - vertexData type parameterpublic interface VertexIdData<I extends org.apache.hadoop.io.WritableComparable,T> extends ImmutableClassesGiraphConfigurable, org.apache.hadoop.io.Writable
| Modifier and Type | Method and Description |
|---|---|
void |
add(byte[] serializedId,
int idPos,
T data)
Add a serialized vertex id and data.
|
void |
add(I vertexId,
T data)
Add a vertex id and data pair to the collection.
|
void |
clear()
Clear the list.
|
T |
createData()
Create a new data object.
|
int |
getSerializedSize()
Get the size of this object in serialized form.
|
int |
getSize()
Get the number of bytes used.
|
VertexIdDataIterator<I,T> |
getVertexIdDataIterator()
Get an iterator over the pairs.
|
void |
initialize()
Initialize the inner state.
|
void |
initialize(int expectedSize)
Initialize the inner state, with a known size.
|
boolean |
isEmpty()
Check if the list is empty.
|
void |
readData(ExtendedDataInput in,
T data)
Read a data object's fields from an
ExtendedDataInput. |
void |
writeData(ExtendedDataOutput out,
T data)
Write a data object to an
ExtendedDataOutput. |
getConfsetConfT createData()
void writeData(ExtendedDataOutput out, T data) throws IOException
ExtendedDataOutput.out - ExtendedDataOutputdata - Data object to writeIOExceptionvoid readData(ExtendedDataInput in, T data) throws IOException
ExtendedDataInput.in - ExtendedDataInputdata - Data object to fill in-placeIOExceptionvoid initialize()
add() is
called.void initialize(int expectedSize)
add() is called.expectedSize - Number of bytes to be expectedvoid add(I vertexId, T data)
vertexId - Vertex iddata - Datavoid add(byte[] serializedId,
int idPos,
T data)
serializedId - The bye array which holds the serialized id.idPos - The end position of the serialized id in the byte array.data - Dataint getSize()
int getSerializedSize()
boolean isEmpty()
void clear()
VertexIdDataIterator<I,T> getVertexIdDataIterator()
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.