I - Vertex idM - Message datapublic class ByteArrayVertexIdMessages<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable> extends ByteArrayVertexIdData<I,M> implements VertexIdMessages<I,M>
extendedDataOutput| Constructor and Description |
|---|
ByteArrayVertexIdMessages(MessageValueFactory<M> messageValueFactory)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(byte[] serializedId,
int idPos,
M message)
Add a serialized vertex id and data.
|
void |
add(I vertexId,
M message)
Add a vertex id and data pair to the collection.
|
M |
createData()
Create a new data object.
|
ByteStructVertexIdMessageBytesIterator<I,M> |
getVertexIdMessageBytesIterator()
Get specialized iterator that will instantiate the vertex id and
message of this object.
|
ByteStructVertexIdMessageIterator<I,M> |
getVertexIdMessageIterator()
Get specialized iterator that will instiantiate the vertex id and
message of this object.
|
void |
initialize()
Initialize the inner state.
|
void |
initialize(int expectedSize)
Initialize the inner state, with a known size.
|
void |
readData(ExtendedDataInput in,
M message)
Read a data object's fields from an
ExtendedDataInput. |
void |
readFields(DataInput dataInput) |
void |
write(DataOutput dataOutput) |
void |
writeData(ExtendedDataOutput out,
M message)
Write a data object to an
ExtendedDataOutput. |
getByteArrayclear, getConf, getSerializedSize, getSize, getVertexIdDataIterator, isEmpty, setConfclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclear, getSerializedSize, getSize, getVertexIdDataIterator, isEmptygetConfsetConfpublic ByteArrayVertexIdMessages(MessageValueFactory<M> messageValueFactory)
messageValueFactory - Class for messagespublic M createData()
VertexIdDatacreateData in interface VertexIdData<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>public void writeData(ExtendedDataOutput out, M message) throws IOException
VertexIdDataExtendedDataOutput.writeData in interface VertexIdData<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>out - ExtendedDataOutputmessage - Data object to writeIOExceptionpublic void readData(ExtendedDataInput in, M message) throws IOException
VertexIdDataExtendedDataInput.readData in interface VertexIdData<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>in - ExtendedDataInputmessage - Data object to fill in-placeIOExceptionpublic void initialize()
VertexIdDataadd() is
called.initialize in interface VertexIdData<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>initialize in class AbstractVertexIdData<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>public void initialize(int expectedSize)
VertexIdDataadd() is called.initialize in interface VertexIdData<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>initialize in class AbstractVertexIdData<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>expectedSize - Number of bytes to be expectedpublic ByteStructVertexIdMessageIterator<I,M> getVertexIdMessageIterator()
VertexIdMessagesgetVertexIdMessageIterator in interface VertexIdMessages<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>public void add(I vertexId, M message)
VertexIdDataadd in interface VertexIdData<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>add in class AbstractVertexIdData<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>vertexId - Vertex idmessage - Datapublic void add(byte[] serializedId,
int idPos,
M message)
VertexIdDataadd in interface VertexIdData<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>add in class AbstractVertexIdData<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>serializedId - The bye array which holds the serialized id.idPos - The end position of the serialized id in the byte array.message - Datapublic ByteStructVertexIdMessageBytesIterator<I,M> getVertexIdMessageBytesIterator()
VertexIdMessagesgetVertexIdMessageBytesIterator in interface VertexIdMessages<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>public void write(DataOutput dataOutput) throws IOException
write in interface org.apache.hadoop.io.Writablewrite in class ByteArrayVertexIdData<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>IOExceptionpublic void readFields(DataInput dataInput) throws IOException
readFields in interface org.apache.hadoop.io.WritablereadFields in class ByteArrayVertexIdData<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>IOExceptionCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.