final JobInfo jobInfo = jobStatus.getJobInfo(directorJobId);
final AtomicBoolean incomplete = new AtomicBoolean(false);
ArrayList<Thread> queryList = new ArrayList<Thread>();
for (final Future<Object> progress : progressList) {
final ActorRef m = askMap.get(progress);
Runnable temp = new Runnable() {
@Override
public void run() {
try {
slaveProgressMessage progressMessage = (slaveProgressMessage) Await
.result(progress, duration);
m.tell(new notCongestionSignal(), ActorRef.noSender());
if (progressMessage.completed) {
if (!collectedManager.containsKey(m)) {
completedButNotCollectedManager.add(m);
collectedManager.put(m, true);
}
} else {
incomplete.getAndSet(true);
}
eachWorkerResponseCount.get(
m.path().toString()).getAndAdd(
progressMessage.responseCount);
eachWorkerRequestCount.get(
m.path().toString()).getAndAdd(
progressMessage.requestCount);
jobInfo.capacityUsage.put(
m.path().address().toString(),
progressMessage.capacityPercent);
} catch (Exception e) {
incomplete.getAndSet(true);
System.out.println("Monitor query timeout.");
}