context.progress();
partitionStatsList.clear();
for (Partition<I, V, E, M> partition :
serviceWorker.getPartitionMap().values()) {
PartitionStats partitionStats =
new PartitionStats(partition.getPartitionId(), 0, 0, 0);
for (BasicVertex<I, V, E, M> basicVertex :
partition.getVertices()) {
// Make sure every vertex has the current
// graphState before computing
basicVertex.setGraphState(graphState);
if (basicVertex.isHalted()
&& !Iterables.isEmpty(basicVertex.getMessages())) {
basicVertex.halt = false;
}
if (!basicVertex.isHalted()) {
Iterator<M> vertexMsgIt =
basicVertex.getMessages().iterator();
context.progress();
basicVertex.compute(vertexMsgIt);
basicVertex.releaseResources();
}
if (basicVertex.isHalted()) {
partitionStats.incrFinishedVertexCount();
}
partitionStats.incrVertexCount();
partitionStats.addEdgeCount(basicVertex.getNumOutEdges());
}
partitionStatsList.add(partitionStats);
}
} while (!serviceWorker.finishSuperstep(partitionStatsList));
if (LOG.isInfoEnabled()) {