M - message typepublic class LongPointerListPerVertexStore<M extends org.apache.hadoop.io.Writable> extends LongAbstractListStore<M,it.unimi.dsi.fastutil.longs.LongArrayList> implements MessageStore<org.apache.hadoop.io.LongWritable,M>
ExtendedByteArrayOutputBuffer
and stores long pointers that point to serialized messagesconfig, map, messageValueFactory, partitionInfo| Constructor and Description |
|---|
LongPointerListPerVertexStore(MessageValueFactory<M> messageValueFactory,
PartitionSplitInfo<org.apache.hadoop.io.LongWritable> partitionInfo,
ImmutableClassesGiraphConfiguration<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable> config)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMessage(org.apache.hadoop.io.LongWritable vertexId,
M message)
Adds a message for a particular vertex
The method is used by InternalMessageStore to send local messages; for
the general case, use a more efficient addPartitionMessages
|
void |
addPartitionMessages(int partitionId,
VertexIdMessages<org.apache.hadoop.io.LongWritable,M> messages)
Adds messages for partition
|
protected it.unimi.dsi.fastutil.longs.LongArrayList |
createList()
Create an instance of L
|
Iterable<M> |
getVertexMessages(org.apache.hadoop.io.LongWritable vertexId)
Gets messages for a vertex.
|
boolean |
isPointerListEncoding()
True if this message-store encodes messages as a list of long pointers
to compact serialized messages
|
void |
readFieldsForPartition(DataInput in,
int partitionId)
Deserialize messages for one partition
|
void |
writePartition(DataOutput out,
int partitionId)
Serialize messages for one partition.
|
finalizeStore, getList, hasMessagesForVertexclearAll, clearPartition, clearVertexMessages, getPartitionDestinationVertices, getPartitionMap, hasMessagesForPartitionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclearAll, clearPartition, clearVertexMessages, finalizeStore, getPartitionDestinationVertices, hasMessagesForPartition, hasMessagesForVertexpublic LongPointerListPerVertexStore(MessageValueFactory<M> messageValueFactory, PartitionSplitInfo<org.apache.hadoop.io.LongWritable> partitionInfo, ImmutableClassesGiraphConfiguration<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable> config)
messageValueFactory - Factory for creating message valuespartitionInfo - Partition split infoconfig - Hadoop configurationpublic boolean isPointerListEncoding()
MessageStoreisPointerListEncoding in interface MessageStore<org.apache.hadoop.io.LongWritable,M extends org.apache.hadoop.io.Writable>protected it.unimi.dsi.fastutil.longs.LongArrayList createList()
LongAbstractListStorecreateList in class LongAbstractListStore<M extends org.apache.hadoop.io.Writable,it.unimi.dsi.fastutil.longs.LongArrayList>public void addPartitionMessages(int partitionId,
VertexIdMessages<org.apache.hadoop.io.LongWritable,M> messages)
MessageStoreaddPartitionMessages in interface MessageStore<org.apache.hadoop.io.LongWritable,M extends org.apache.hadoop.io.Writable>partitionId - Id of partitionmessages - Collection of vertex ids and messages we want to addpublic void addMessage(org.apache.hadoop.io.LongWritable vertexId,
M message)
throws IOException
MessageStoreaddMessage in interface MessageStore<org.apache.hadoop.io.LongWritable,M extends org.apache.hadoop.io.Writable>vertexId - Id of target vertexmessage - A message to sendIOExceptionpublic Iterable<M> getVertexMessages(org.apache.hadoop.io.LongWritable vertexId)
MessageStoregetVertexMessages in interface MessageStore<org.apache.hadoop.io.LongWritable,M extends org.apache.hadoop.io.Writable>vertexId - Vertex id for which we want to get messagespublic void writePartition(DataOutput out, int partitionId) throws IOException
MessageStorewritePartition in interface MessageStore<org.apache.hadoop.io.LongWritable,M extends org.apache.hadoop.io.Writable>out - DataOutput to serialize this object intopartitionId - Id of partitionIOExceptionpublic void readFieldsForPartition(DataInput in, int partitionId) throws IOException
MessageStorereadFieldsForPartition in interface MessageStore<org.apache.hadoop.io.LongWritable,M extends org.apache.hadoop.io.Writable>in - DataInput to deserialize this object
from.partitionId - Id of partitionIOExceptionCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.