|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.giraph.comm.SendCache<I,M,ByteArrayVertexIdMessages<I,M>>
org.apache.giraph.comm.SendMessageCache<I,M>
I - Vertex idM - Message datapublic class SendMessageCache<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>
Aggregates the messages to be sent to workers so they can be sent in bulk. Not thread-safe.
| Constructor Summary | |
|---|---|
SendMessageCache(ImmutableClassesGiraphConfiguration conf,
CentralizedServiceWorker<?,?,?,?> serviceWorker)
Constructor |
|
| Method Summary | |
|---|---|
int |
addMessage(WorkerInfo workerInfo,
int partitionId,
I destVertexId,
M message)
Add a message to the cache. |
ByteArrayVertexIdMessages<I,M> |
createByteArrayVertexIdData()
Create a new ByteArrayVertexIdData specialized for the use case. |
PairList<WorkerInfo,PairList<Integer,ByteArrayVertexIdMessages<I,M>>> |
removeAllMessages()
Gets all the messages and removes them from the cache. |
PairList<Integer,ByteArrayVertexIdMessages<I,M>> |
removeWorkerMessages(WorkerInfo workerInfo)
Gets the messages for a worker and removes it from the cache. |
| Methods inherited from class org.apache.giraph.comm.SendCache |
|---|
addData, removeAllData, removeWorkerData |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SendMessageCache(ImmutableClassesGiraphConfiguration conf,
CentralizedServiceWorker<?,?,?,?> serviceWorker)
conf - Giraph configurationserviceWorker - Service worker| Method Detail |
|---|
public ByteArrayVertexIdMessages<I,M> createByteArrayVertexIdData()
SendCacheByteArrayVertexIdData specialized for the use case.
createByteArrayVertexIdData in class SendCache<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable,ByteArrayVertexIdMessages<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>>ByteArrayVertexIdData
public int addMessage(WorkerInfo workerInfo,
int partitionId,
I destVertexId,
M message)
workerInfo - the remote worker destinationpartitionId - the remote Partition this message belongs todestVertexId - vertex id that is ultimate destinationmessage - Message to send to remote worker
public PairList<Integer,ByteArrayVertexIdMessages<I,M>> removeWorkerMessages(WorkerInfo workerInfo)
workerInfo - the address of the worker who owns the data
partitions that are receiving the messages
public PairList<WorkerInfo,PairList<Integer,ByteArrayVertexIdMessages<I,M>>> removeAllMessages()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||