M
- message typeT
- datastructure used to hold messagespublic abstract class LongAbstractStore<M extends org.apache.hadoop.io.Writable,T> extends Object implements MessageStore<org.apache.hadoop.io.LongWritable,M>
Modifier and Type | Field and Description |
---|---|
protected ImmutableClassesGiraphConfiguration<org.apache.hadoop.io.LongWritable,?,?> |
config
Giraph configuration
|
protected it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap<it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<T>> |
map
Map from partition id to map from vertex id to message
|
protected MessageValueFactory<M> |
messageValueFactory
Message value factory
|
protected PartitionSplitInfo<org.apache.hadoop.io.LongWritable> |
partitionInfo
Service worker
|
Constructor and Description |
---|
LongAbstractStore(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 |
clearAll()
Clears all resources used by this store.
|
void |
clearPartition(int partitionId)
Clears messages for a partition.
|
void |
clearVertexMessages(org.apache.hadoop.io.LongWritable vertexId)
Clears messages for a vertex.
|
Iterable<org.apache.hadoop.io.LongWritable> |
getPartitionDestinationVertices(int partitionId)
Gets vertex ids from selected partition which we have messages for
|
protected it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<T> |
getPartitionMap(org.apache.hadoop.io.LongWritable vertexId)
Get map which holds messages for partition which vertex belongs to.
|
boolean |
hasMessagesForPartition(int partitionId)
Check if we have messages for some partition
|
boolean |
hasMessagesForVertex(org.apache.hadoop.io.LongWritable vertexId)
Check if we have messages for some vertex
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addMessage, addPartitionMessages, finalizeStore, getVertexMessages, isPointerListEncoding, readFieldsForPartition, writePartition
protected final MessageValueFactory<M extends org.apache.hadoop.io.Writable> messageValueFactory
protected final it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap<it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<T>> map
protected final PartitionSplitInfo<org.apache.hadoop.io.LongWritable> partitionInfo
protected final ImmutableClassesGiraphConfiguration<org.apache.hadoop.io.LongWritable,?,?> config
public LongAbstractStore(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 configurationprotected it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<T> getPartitionMap(org.apache.hadoop.io.LongWritable vertexId)
vertexId
- Id of the vertexpublic void clearPartition(int partitionId)
MessageStore
clearPartition
in interface MessageStore<org.apache.hadoop.io.LongWritable,M extends org.apache.hadoop.io.Writable>
partitionId
- Partition id for which we want to clear messagespublic boolean hasMessagesForVertex(org.apache.hadoop.io.LongWritable vertexId)
MessageStore
hasMessagesForVertex
in interface MessageStore<org.apache.hadoop.io.LongWritable,M extends org.apache.hadoop.io.Writable>
vertexId
- Id of vertex which we want to checkpublic boolean hasMessagesForPartition(int partitionId)
MessageStore
hasMessagesForPartition
in interface MessageStore<org.apache.hadoop.io.LongWritable,M extends org.apache.hadoop.io.Writable>
partitionId
- Id of partition which we want to checkpublic void clearVertexMessages(org.apache.hadoop.io.LongWritable vertexId)
MessageStore
clearVertexMessages
in interface MessageStore<org.apache.hadoop.io.LongWritable,M extends org.apache.hadoop.io.Writable>
vertexId
- Vertex id for which we want to clear messagespublic void clearAll()
MessageStore
clearAll
in interface MessageStore<org.apache.hadoop.io.LongWritable,M extends org.apache.hadoop.io.Writable>
public Iterable<org.apache.hadoop.io.LongWritable> getPartitionDestinationVertices(int partitionId)
MessageStore
getPartitionDestinationVertices
in interface MessageStore<org.apache.hadoop.io.LongWritable,M extends org.apache.hadoop.io.Writable>
partitionId
- Id of partitionCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.