PairList<WorkerInfo,
PairList<Integer, ByteArrayVertexIdMessages<I, M>>>.Iterator
iterator = remainingMessageCache.getIterator();
while (iterator.hasNext()) {
iterator.next();
WritableRequest writableRequest =
new SendWorkerMessagesRequest<I, M>(
iterator.getCurrentSecond());
doRequest(iterator.getCurrentFirst(), writableRequest);
}
// Execute the remaining sends edges (if any)
PairList<WorkerInfo, PairList<Integer,
ByteArrayVertexIdEdges<I, E>>>
remainingEdgeCache = sendEdgeCache.removeAllEdges();
PairList<WorkerInfo,
PairList<Integer, ByteArrayVertexIdEdges<I, E>>>.Iterator
edgeIterator = remainingEdgeCache.getIterator();
while (edgeIterator.hasNext()) {
edgeIterator.next();
WritableRequest writableRequest =
new SendWorkerEdgesRequest<I, E>(
edgeIterator.getCurrentSecond());
doRequest(edgeIterator.getCurrentFirst(), writableRequest);
}
// Execute the remaining sends mutations (if any)
Map<Integer, Map<I, VertexMutations<I, V, E, M>>> remainingMutationsCache =
sendMutationsCache.removeAllPartitionMutations();
for (Map.Entry<Integer, Map<I, VertexMutations<I, V, E, M>>> entry :
remainingMutationsCache.entrySet()) {
WritableRequest writableRequest =
new SendPartitionMutationsRequest<I, V, E, M>(
entry.getKey(), entry.getValue());
PartitionOwner partitionOwner =
serviceWorker.getVertexPartitionOwner(
entry.getValue().keySet().iterator().next());