V
- Vertex valueE
- Edge valuepublic class LongEdgeStore<V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable> extends AbstractEdgeStore<org.apache.hadoop.io.LongWritable,V,E,Long,it.unimi.dsi.fastutil.longs.Long2ObjectMap.Entry<OutEdges<org.apache.hadoop.io.LongWritable,E>>>
configuration, PROGRESS_COUNTER, progressable, reuseEdgeObjects, service, transientEdges, useInputOutEdges
Constructor and Description |
---|
LongEdgeStore(CentralizedServiceWorker<org.apache.hadoop.io.LongWritable,V,E> service,
ImmutableClassesGiraphConfiguration<org.apache.hadoop.io.LongWritable,V,E> configuration,
org.apache.hadoop.util.Progressable progressable)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected org.apache.hadoop.io.LongWritable |
createVertexId(it.unimi.dsi.fastutil.longs.Long2ObjectMap.Entry<OutEdges<org.apache.hadoop.io.LongWritable,E>> entry)
Create vertexId from a given key
|
protected it.unimi.dsi.fastutil.longs.Long2ObjectMap<OutEdges<org.apache.hadoop.io.LongWritable,E>> |
getPartitionEdges(int partitionId)
Get OutEdges for a given partition
|
protected OutEdges<org.apache.hadoop.io.LongWritable,E> |
getPartitionEdges(it.unimi.dsi.fastutil.longs.Long2ObjectMap.Entry<OutEdges<org.apache.hadoop.io.LongWritable,E>> entry)
Return the OutEdges for a given partition
|
protected Iterator<it.unimi.dsi.fastutil.longs.Long2ObjectMap.Entry<OutEdges<org.apache.hadoop.io.LongWritable,E>>> |
getPartitionEdgesIterator(Map<Long,OutEdges<org.apache.hadoop.io.LongWritable,E>> partitionEdges)
Get iterator for partition edges
|
protected org.apache.hadoop.io.LongWritable |
getVertexId(it.unimi.dsi.fastutil.longs.Long2ObjectMap.Entry<OutEdges<org.apache.hadoop.io.LongWritable,E>> entry,
org.apache.hadoop.io.LongWritable representativeVertexId)
Get vertexId for a given key
|
protected OutEdges<org.apache.hadoop.io.LongWritable,E> |
getVertexOutEdges(VertexIdEdgeIterator<org.apache.hadoop.io.LongWritable,E> vertexIdEdgeIterator,
Map<Long,OutEdges<org.apache.hadoop.io.LongWritable,E>> partitionEdgesIn)
Get out-edges for a given vertex
|
protected Long |
readVertexKey(DataInput input)
Reads the given key from the input
|
protected void |
writeVertexKey(Long key,
DataOutput output)
Writes the given key to the output
|
addPartitionEdges, hasEdgesForPartition, moveEdgesToVertices, readPartitionEdgeStore, writePartitionEdgeStore
getConf, setConf
public LongEdgeStore(CentralizedServiceWorker<org.apache.hadoop.io.LongWritable,V,E> service, ImmutableClassesGiraphConfiguration<org.apache.hadoop.io.LongWritable,V,E> configuration, org.apache.hadoop.util.Progressable progressable)
service
- Service workerconfiguration
- Configurationprogressable
- Progressableprotected org.apache.hadoop.io.LongWritable getVertexId(it.unimi.dsi.fastutil.longs.Long2ObjectMap.Entry<OutEdges<org.apache.hadoop.io.LongWritable,E>> entry, org.apache.hadoop.io.LongWritable representativeVertexId)
AbstractEdgeStore
getVertexId
in class AbstractEdgeStore<org.apache.hadoop.io.LongWritable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,Long,it.unimi.dsi.fastutil.longs.Long2ObjectMap.Entry<OutEdges<org.apache.hadoop.io.LongWritable,E extends org.apache.hadoop.io.Writable>>>
entry
- for vertexId keyrepresentativeVertexId
- representativeVertexIdprotected org.apache.hadoop.io.LongWritable createVertexId(it.unimi.dsi.fastutil.longs.Long2ObjectMap.Entry<OutEdges<org.apache.hadoop.io.LongWritable,E>> entry)
AbstractEdgeStore
createVertexId
in class AbstractEdgeStore<org.apache.hadoop.io.LongWritable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,Long,it.unimi.dsi.fastutil.longs.Long2ObjectMap.Entry<OutEdges<org.apache.hadoop.io.LongWritable,E extends org.apache.hadoop.io.Writable>>>
entry
- for vertexId keyprotected OutEdges<org.apache.hadoop.io.LongWritable,E> getPartitionEdges(it.unimi.dsi.fastutil.longs.Long2ObjectMap.Entry<OutEdges<org.apache.hadoop.io.LongWritable,E>> entry)
AbstractEdgeStore
getPartitionEdges
in class AbstractEdgeStore<org.apache.hadoop.io.LongWritable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,Long,it.unimi.dsi.fastutil.longs.Long2ObjectMap.Entry<OutEdges<org.apache.hadoop.io.LongWritable,E extends org.apache.hadoop.io.Writable>>>
entry
- for vertexId keyprotected void writeVertexKey(Long key, DataOutput output) throws IOException
AbstractEdgeStore
writeVertexKey
in class AbstractEdgeStore<org.apache.hadoop.io.LongWritable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,Long,it.unimi.dsi.fastutil.longs.Long2ObjectMap.Entry<OutEdges<org.apache.hadoop.io.LongWritable,E extends org.apache.hadoop.io.Writable>>>
key
- input key to be writtenoutput
- output to write the key toIOException
protected Long readVertexKey(DataInput input) throws IOException
AbstractEdgeStore
readVertexKey
in class AbstractEdgeStore<org.apache.hadoop.io.LongWritable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,Long,it.unimi.dsi.fastutil.longs.Long2ObjectMap.Entry<OutEdges<org.apache.hadoop.io.LongWritable,E extends org.apache.hadoop.io.Writable>>>
input
- input to read the key fromIOException
protected Iterator<it.unimi.dsi.fastutil.longs.Long2ObjectMap.Entry<OutEdges<org.apache.hadoop.io.LongWritable,E>>> getPartitionEdgesIterator(Map<Long,OutEdges<org.apache.hadoop.io.LongWritable,E>> partitionEdges)
AbstractEdgeStore
getPartitionEdgesIterator
in class AbstractEdgeStore<org.apache.hadoop.io.LongWritable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,Long,it.unimi.dsi.fastutil.longs.Long2ObjectMap.Entry<OutEdges<org.apache.hadoop.io.LongWritable,E extends org.apache.hadoop.io.Writable>>>
partitionEdges
- map of out-edges for vertices in a partitionprotected it.unimi.dsi.fastutil.longs.Long2ObjectMap<OutEdges<org.apache.hadoop.io.LongWritable,E>> getPartitionEdges(int partitionId)
AbstractEdgeStore
getPartitionEdges
in class AbstractEdgeStore<org.apache.hadoop.io.LongWritable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,Long,it.unimi.dsi.fastutil.longs.Long2ObjectMap.Entry<OutEdges<org.apache.hadoop.io.LongWritable,E extends org.apache.hadoop.io.Writable>>>
partitionId
- id of partitionprotected OutEdges<org.apache.hadoop.io.LongWritable,E> getVertexOutEdges(VertexIdEdgeIterator<org.apache.hadoop.io.LongWritable,E> vertexIdEdgeIterator, Map<Long,OutEdges<org.apache.hadoop.io.LongWritable,E>> partitionEdgesIn)
AbstractEdgeStore
getVertexOutEdges
in class AbstractEdgeStore<org.apache.hadoop.io.LongWritable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,Long,it.unimi.dsi.fastutil.longs.Long2ObjectMap.Entry<OutEdges<org.apache.hadoop.io.LongWritable,E extends org.apache.hadoop.io.Writable>>>
vertexIdEdgeIterator
- vertex Id Edge iteratorpartitionEdgesIn
- map of out-edges for vertices in a partitionCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.