PairList<WorkerInfo,
PairList<Integer, ExtendedDataOutput>>.Iterator
vertexIterator = remainingVertexCache.getIterator();
while (vertexIterator.hasNext()) {
vertexIterator.next();
WritableRequest writableRequest =
new SendWorkerVerticesRequest(
configuration, vertexIterator.getCurrentSecond());
doRequest(vertexIterator.getCurrentFirst(), writableRequest);
}
// Execute the remaining sends edges (if any)
PairList<WorkerInfo, PairList<Integer,
VertexIdEdges<I, E>>>
remainingEdgeCache = sendEdgeCache.removeAllEdges();
PairList<WorkerInfo,
PairList<Integer, VertexIdEdges<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>>> remainingMutationsCache =
sendMutationsCache.removeAllPartitionMutations();
for (Map.Entry<Integer, Map<I, VertexMutations<I, V, E>>> entry :
remainingMutationsCache.entrySet()) {
WritableRequest writableRequest =
new SendPartitionMutationsRequest<I, V, E>(
entry.getKey(), entry.getValue());
PartitionOwner partitionOwner =
serviceWorker.getVertexPartitionOwner(
entry.getValue().keySet().iterator().next());