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, write
clear, getConf, getSerializedSize, getSize, getVertexIdDataIterator, initialize, initialize, isEmpty, setConf
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clear, getSerializedSize, getSize, getVertexIdDataIterator, initialize, initialize, isEmpty
getConf
setConf
public ByteArrayOneMessageToManyIds(MessageValueFactory<M> messageValueFactory)
messageValueFactory
- Class for messagespublic M createData()
VertexIdData
createData
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
VertexIdData
ExtendedDataOutput
.writeData
in interface VertexIdData<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>
out
- ExtendedDataOutput
message
- Data object to writeIOException
public void readData(ExtendedDataInput in, M message) throws IOException
VertexIdData
ExtendedDataInput
.readData
in interface VertexIdData<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>
in
- ExtendedDataInput
message
- Data object to fill in-placeIOException
public 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)
VertexIdData
add
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)
VertexIdData
add
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()
VertexIdMessages
getVertexIdMessageBytesIterator
in interface VertexIdMessages<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>
public VertexIdMessageIterator<I,M> getVertexIdMessageIterator()
VertexIdMessages
getVertexIdMessageIterator
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.