I
- Vertex idE
- Edge valuepublic class SendEdgeCache<I extends org.apache.hadoop.io.WritableComparable,E extends org.apache.hadoop.io.Writable> extends SendVertexIdDataCache<I,Edge<I,E>,VertexIdEdges<I,E>>
Constructor and Description |
---|
SendEdgeCache(ImmutableClassesGiraphConfiguration conf,
CentralizedServiceWorker<?,?,?> serviceWorker)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
addEdge(WorkerInfo workerInfo,
int partitionId,
I destVertexId,
Edge<I,E> edge)
Add an edge to the cache.
|
VertexIdEdges<I,E> |
createVertexIdData()
Create a new
VertexIdData specialized for the use case. |
PairList<WorkerInfo,PairList<Integer,VertexIdEdges<I,E>>> |
removeAllEdges()
Gets all the edges and removes them from the cache.
|
PairList<Integer,VertexIdEdges<I,E>> |
removeWorkerEdges(WorkerInfo workerInfo)
Gets the edges for a worker and removes it from the cache.
|
addData, addData
getConf, getData, getInitialBufferSize, getNumWorkers, getSendWorkerInitialBufferSize, getServiceWorker, getWorkerPartitions, incrDataSize, removeAllData, removeWorkerData, setData
public SendEdgeCache(ImmutableClassesGiraphConfiguration conf, CentralizedServiceWorker<?,?,?> serviceWorker)
conf
- Giraph configurationserviceWorker
- Service workerpublic VertexIdEdges<I,E> createVertexIdData()
SendVertexIdDataCache
VertexIdData
specialized for the use case.createVertexIdData
in class SendVertexIdDataCache<I extends org.apache.hadoop.io.WritableComparable,Edge<I extends org.apache.hadoop.io.WritableComparable,E extends org.apache.hadoop.io.Writable>,VertexIdEdges<I extends org.apache.hadoop.io.WritableComparable,E extends org.apache.hadoop.io.Writable>>
VertexIdData
public int addEdge(WorkerInfo workerInfo, int partitionId, I destVertexId, Edge<I,E> edge)
workerInfo
- the remote worker destinationpartitionId
- the remote Partition this edge belongs todestVertexId
- vertex id that is ultimate destinationedge
- Edge to send to remote workerpublic PairList<Integer,VertexIdEdges<I,E>> removeWorkerEdges(WorkerInfo workerInfo)
workerInfo
- the address of the worker who owns the data
partitions that are receiving the edgespublic PairList<WorkerInfo,PairList<Integer,VertexIdEdges<I,E>>> removeAllEdges()
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.