I
- Vertex idM
- Message dataL
- List typepublic abstract class AbstractListPerVertexStore<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable,L extends List> extends SimpleMessageStore<I,M,L>
SimpleMessageStore
where
multiple messages are stored per vertex as a list
Used when there is no combiner provided.config, map, messageValueFactory, partitionInfo
Constructor and Description |
---|
AbstractListPerVertexStore(MessageValueFactory<M> messageValueFactory,
PartitionSplitInfo<I> partitionInfo,
ImmutableClassesGiraphConfiguration<I,?,?> config)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected abstract L |
createList()
Create an instance of L
|
protected L |
getOrCreateList(I vertexId)
Get the list of pointers for a vertex
Each pointer has information of how to access an encoded message
for this vertex
This method will take ownership of the vertex id from the
iterator if necessary (when used in the partition map entry)
|
protected L |
getOrCreateList(VertexIdIterator<I> iterator)
Get the list of pointers for a vertex
Each pointer has information of how to access an encoded message
for this vertex
|
Iterable<M> |
getVertexMessages(I vertexId)
Gets messages for a vertex.
|
clearAll, clearPartition, clearVertexMessages, finalizeStore, getMessagesAsIterable, getNumberOfMessagesIn, getOrCreatePartitionMap, getPartitionDestinationVertices, getPartitionId, hasMessagesForPartition, hasMessagesForVertex, readFieldsForMessages, readFieldsForPartition, writeMessages, writePartition
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addMessage, addPartitionMessages, isPointerListEncoding
public AbstractListPerVertexStore(MessageValueFactory<M> messageValueFactory, PartitionSplitInfo<I> partitionInfo, ImmutableClassesGiraphConfiguration<I,?,?> config)
messageValueFactory
- Message class held in the storepartitionInfo
- Partition split infoconfig
- Hadoop configurationprotected abstract L createList()
protected L getOrCreateList(VertexIdIterator<I> iterator)
iterator
- vertex id iteratorprotected L getOrCreateList(I vertexId)
vertexId
- vertex idpublic Iterable<M> getVertexMessages(I vertexId)
MessageStore
getVertexMessages
in interface MessageStore<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>
getVertexMessages
in class SimpleMessageStore<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable,L extends List>
vertexId
- Vertex id for which we want to get messagesCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.