for (Integer partitionId :
serviceWorker.getPartitionStore().getPartitionIds()) {
computePartitionIdQueue.add(partitionId);
}
GiraphTimerContext computeAllTimerContext = computeAll.time();
timeToFirstMessageTimerContext = timeToFirstMessage.time();
CallableFactory<Collection<PartitionStats>> callableFactory =
new CallableFactory<Collection<PartitionStats>>() {
@Override
public Callable<Collection<PartitionStats>> newCallable(
int callableId) {
return new ComputeCallable<I, V, E, M>(
context,
graphState,
messageStore,
computePartitionIdQueue,
conf,
serviceWorker);
}
};
List<Collection<PartitionStats>> results =
ProgressableUtils.getResultsWithNCallables(callableFactory,
numThreads, "compute-%d", context);
for (Collection<PartitionStats> result : results) {
partitionStatsList.addAll(result);
}
computeAllTimerContext.stop();
}