use of it.unimi.dsi.fastutil.ints.IntListIterator in project presto by prestodb.
the class FixedLifespanScheduler method scheduleInitial.
public void scheduleInitial(SourceScheduler scheduler) {
checkState(!initialScheduled);
initialScheduled = true;
for (Map.Entry<InternalNode, IntListIterator> entry : nodeToDriverGroupsMap.entrySet()) {
IntListIterator driverGroupsIterator = entry.getValue();
int driverGroupsScheduled = 0;
while (driverGroupsIterator.hasNext()) {
int driverGroupId = driverGroupsIterator.nextInt();
scheduler.startLifespan(Lifespan.driverGroup(driverGroupId), partitionHandles.get(driverGroupId));
driverGroupsScheduled++;
if (concurrentLifespansPerTask.isPresent() && driverGroupsScheduled == concurrentLifespansPerTask.getAsInt()) {
break;
}
}
}
}
Aggregations