Search in sources :

Example 6 with IntListIterator

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;
            }
        }
    }
}
Also used : IntListIterator(it.unimi.dsi.fastutil.ints.IntListIterator) InternalNode(com.facebook.presto.metadata.InternalNode) Int2ObjectOpenHashMap(it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap) HashMap(java.util.HashMap) ImmutableMap.toImmutableMap(com.google.common.collect.ImmutableMap.toImmutableMap) BucketNodeMap(com.facebook.presto.execution.scheduler.BucketNodeMap) Int2ObjectMap(it.unimi.dsi.fastutil.ints.Int2ObjectMap) Map(java.util.Map)

Aggregations

IntListIterator (it.unimi.dsi.fastutil.ints.IntListIterator)6 Int2ObjectMap (it.unimi.dsi.fastutil.ints.Int2ObjectMap)2 Int2ObjectOpenHashMap (it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap)2 Test (org.junit.Test)2 Lifespan (com.facebook.presto.execution.Lifespan)1 BucketNodeMap (com.facebook.presto.execution.scheduler.BucketNodeMap)1 InternalNode (com.facebook.presto.metadata.InternalNode)1 ImmutableMap.toImmutableMap (com.google.common.collect.ImmutableMap.toImmutableMap)1 Clustering (de.lmu.ifi.dbs.elki.data.Clustering)1 ClusterModel (de.lmu.ifi.dbs.elki.data.model.ClusterModel)1 ArrayDBIDs (de.lmu.ifi.dbs.elki.database.ids.ArrayDBIDs)1 ArrayModifiableDBIDs (de.lmu.ifi.dbs.elki.database.ids.ArrayModifiableDBIDs)1 DBIDArrayIter (de.lmu.ifi.dbs.elki.database.ids.DBIDArrayIter)1 DBIDs (de.lmu.ifi.dbs.elki.database.ids.DBIDs)1 AbortException (de.lmu.ifi.dbs.elki.utilities.exceptions.AbortException)1 Int2IntMap (it.unimi.dsi.fastutil.ints.Int2IntMap)1 Int2IntOpenHashMap (it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1