I - Vertex idM - Message datapublic class ByteArrayOneMessageToManyIds<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 |
|---|
ByteArrayOneMessageToManyIds(MessageValueFactory<M> messageValueFactory)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(byte[] ids,
int idPos,
int count,
M msg)
Add a message.
|
void |
add(byte[] serializedId,
int idPos,
M data)
Add a serialized vertex id and data.
|
void |
add(I vertexId,
M data)
Add a vertex id and data pair to the collection.
|
M |
createData()
Create a new data object.
|
VertexIdMessageBytesIterator<I,M> |
getVertexIdMessageBytesIterator()
Get specialized iterator that will instantiate the vertex id and
message of this object.
|
VertexIdMessageIterator<I,M> |
getVertexIdMessageIterator()
Get specialized iterator that will instiantiate the vertex id and
message of this object.
|
void |
readData(ExtendedDataInput in,
M message)
Read a data object's fields from an
ExtendedDataInput. |
void |
writeData(ExtendedDataOutput out,
M message)
Write a data object to an
ExtendedDataOutput. |
getByteArray, readFields, writeclear, getConf, getSerializedSize, getSize, getVertexIdDataIterator, initialize, initialize, isEmpty, setConfclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclear, getSerializedSize, getSize, getVertexIdDataIterator, initialize, initialize, isEmptygetConfsetConfpublic ByteArrayOneMessageToManyIds(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 add(byte[] ids,
int idPos,
int count,
M msg)
ids - The byte array which holds target ids
of this message on the workeridPos - The end position of the ids
information in the byte array above.count - The number of idsmsg - The message sentpublic void add(I vertexId, M data)
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 iddata - Datapublic void add(byte[] serializedId,
int idPos,
M data)
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.data - Datapublic VertexIdMessageBytesIterator<I,M> getVertexIdMessageBytesIterator()
VertexIdMessagesgetVertexIdMessageBytesIterator in interface VertexIdMessages<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>public VertexIdMessageIterator<I,M> getVertexIdMessageIterator()
VertexIdMessagesgetVertexIdMessageIterator in interface VertexIdMessages<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.