I
- Vertex idV
- Vertex valueE
- Edge valuepublic class SimpleEdgeStore<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable> extends AbstractEdgeStore<I,V,E,I,Map.Entry<I,OutEdges<I,E>>>
configuration, PROGRESS_COUNTER, progressable, reuseEdgeObjects, service, transientEdges, useInputOutEdges
Constructor and Description |
---|
SimpleEdgeStore(CentralizedServiceWorker<I,V,E> service,
ImmutableClassesGiraphConfiguration<I,V,E> configuration,
org.apache.hadoop.util.Progressable progressable)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected I |
createVertexId(Map.Entry<I,OutEdges<I,E>> entry)
Create vertexId from a given key
|
protected ConcurrentMap<I,OutEdges<I,E>> |
getPartitionEdges(int partitionId)
Get OutEdges for a given partition
|
protected OutEdges<I,E> |
getPartitionEdges(Map.Entry<I,OutEdges<I,E>> entry)
Return the OutEdges for a given partition
|
protected Iterator<Map.Entry<I,OutEdges<I,E>>> |
getPartitionEdgesIterator(Map<I,OutEdges<I,E>> partitionEdges)
Get iterator for partition edges
|
protected I |
getVertexId(Map.Entry<I,OutEdges<I,E>> entry,
I representativeVertexId)
Get vertexId for a given key
|
protected OutEdges<I,E> |
getVertexOutEdges(VertexIdEdgeIterator<I,E> vertexIdEdgeIterator,
Map<I,OutEdges<I,E>> partitionEdgesIn)
Get out-edges for a given vertex
|
protected I |
readVertexKey(DataInput input)
Reads the given key from the input
|
protected void |
writeVertexKey(I key,
DataOutput output)
Writes the given key to the output
|
addPartitionEdges, hasEdgesForPartition, moveEdgesToVertices, readPartitionEdgeStore, writePartitionEdgeStore
getConf, setConf
public SimpleEdgeStore(CentralizedServiceWorker<I,V,E> service, ImmutableClassesGiraphConfiguration<I,V,E> configuration, org.apache.hadoop.util.Progressable progressable)
service
- Service workerconfiguration
- Configurationprogressable
- Progressableprotected I getVertexId(Map.Entry<I,OutEdges<I,E>> entry, I representativeVertexId)
AbstractEdgeStore
getVertexId
in class AbstractEdgeStore<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,I extends org.apache.hadoop.io.WritableComparable,Map.Entry<I extends org.apache.hadoop.io.WritableComparable,OutEdges<I extends org.apache.hadoop.io.WritableComparable,E extends org.apache.hadoop.io.Writable>>>
entry
- for vertexId keyrepresentativeVertexId
- representativeVertexIdprotected I createVertexId(Map.Entry<I,OutEdges<I,E>> entry)
AbstractEdgeStore
createVertexId
in class AbstractEdgeStore<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,I extends org.apache.hadoop.io.WritableComparable,Map.Entry<I extends org.apache.hadoop.io.WritableComparable,OutEdges<I extends org.apache.hadoop.io.WritableComparable,E extends org.apache.hadoop.io.Writable>>>
entry
- for vertexId keyprotected ConcurrentMap<I,OutEdges<I,E>> getPartitionEdges(int partitionId)
AbstractEdgeStore
getPartitionEdges
in class AbstractEdgeStore<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,I extends org.apache.hadoop.io.WritableComparable,Map.Entry<I extends org.apache.hadoop.io.WritableComparable,OutEdges<I extends org.apache.hadoop.io.WritableComparable,E extends org.apache.hadoop.io.Writable>>>
partitionId
- id of partitionprotected OutEdges<I,E> getPartitionEdges(Map.Entry<I,OutEdges<I,E>> entry)
AbstractEdgeStore
getPartitionEdges
in class AbstractEdgeStore<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,I extends org.apache.hadoop.io.WritableComparable,Map.Entry<I extends org.apache.hadoop.io.WritableComparable,OutEdges<I extends org.apache.hadoop.io.WritableComparable,E extends org.apache.hadoop.io.Writable>>>
entry
- for vertexId keyprotected void writeVertexKey(I key, DataOutput output) throws IOException
AbstractEdgeStore
writeVertexKey
in class AbstractEdgeStore<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,I extends org.apache.hadoop.io.WritableComparable,Map.Entry<I extends org.apache.hadoop.io.WritableComparable,OutEdges<I extends org.apache.hadoop.io.WritableComparable,E extends org.apache.hadoop.io.Writable>>>
key
- input key to be writtenoutput
- output to write the key toIOException
protected I readVertexKey(DataInput input) throws IOException
AbstractEdgeStore
readVertexKey
in class AbstractEdgeStore<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,I extends org.apache.hadoop.io.WritableComparable,Map.Entry<I extends org.apache.hadoop.io.WritableComparable,OutEdges<I extends org.apache.hadoop.io.WritableComparable,E extends org.apache.hadoop.io.Writable>>>
input
- input to read the key fromIOException
protected Iterator<Map.Entry<I,OutEdges<I,E>>> getPartitionEdgesIterator(Map<I,OutEdges<I,E>> partitionEdges)
AbstractEdgeStore
getPartitionEdgesIterator
in class AbstractEdgeStore<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,I extends org.apache.hadoop.io.WritableComparable,Map.Entry<I extends org.apache.hadoop.io.WritableComparable,OutEdges<I extends org.apache.hadoop.io.WritableComparable,E extends org.apache.hadoop.io.Writable>>>
partitionEdges
- map of out-edges for vertices in a partitionprotected OutEdges<I,E> getVertexOutEdges(VertexIdEdgeIterator<I,E> vertexIdEdgeIterator, Map<I,OutEdges<I,E>> partitionEdgesIn)
AbstractEdgeStore
getVertexOutEdges
in class AbstractEdgeStore<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,I extends org.apache.hadoop.io.WritableComparable,Map.Entry<I extends org.apache.hadoop.io.WritableComparable,OutEdges<I extends org.apache.hadoop.io.WritableComparable,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.