I - Vertex idT - DataB - Specialization of VertexIdData for T@NotThreadSafe public abstract class SendVertexIdDataCache<I extends org.apache.hadoop.io.WritableComparable,T,B extends VertexIdData<I,T>> extends SendDataCache<B>
| Constructor and Description |
|---|
SendVertexIdDataCache(ImmutableClassesGiraphConfiguration conf,
CentralizedServiceWorker<?,?,?> serviceWorker,
int maxRequestSize,
float additionalRequestSize)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
addData(WorkerInfo workerInfo,
int partitionId,
byte[] serializedId,
int idPos,
T data)
This method is similar to the method above,
but use a serialized id to replace original I type
destVertexId.
|
int |
addData(WorkerInfo workerInfo,
int partitionId,
I destVertexId,
T data)
Add data to the cache.
|
abstract B |
createVertexIdData()
Create a new
VertexIdData specialized for the use case. |
getConf, getData, getInitialBufferSize, getNumWorkers, getSendWorkerInitialBufferSize, getServiceWorker, getWorkerPartitions, incrDataSize, removeAllData, removeWorkerData, setDatapublic SendVertexIdDataCache(ImmutableClassesGiraphConfiguration conf, CentralizedServiceWorker<?,?,?> serviceWorker, int maxRequestSize, float additionalRequestSize)
conf - Giraph configurationserviceWorker - Service workermaxRequestSize - Maximum request size (in bytes)additionalRequestSize - Additional request size (expressed as a
ratio of the average request size)public abstract B createVertexIdData()
VertexIdData specialized for the use case.VertexIdDatapublic int addData(WorkerInfo workerInfo, int partitionId, I destVertexId, T data)
workerInfo - the remote worker destinationpartitionId - the remote Partition this message belongs todestVertexId - vertex id that is ultimate destinationdata - Data to send to remote workerpublic int addData(WorkerInfo workerInfo, int partitionId, byte[] serializedId, int idPos, T data)
workerInfo - The remote worker destinationpartitionId - The remote Partition this message belongs toserializedId - The byte array to store the serialized target vertex ididPos - The length of bytes of serialized id in the byte array abovedata - Data to send to remote workerCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.