Search in sources :

Example 26 with RemoteTask

use of io.trino.execution.RemoteTask in project trino by trinodb.

the class PipelinedStageExecution method noMoreSourceTasks.

private synchronized void noMoreSourceTasks(PlanFragmentId fragmentId) {
    RemoteSourceNode remoteSource = exchangeSources.get(fragmentId);
    checkArgument(remoteSource != null, "Unknown remote source %s. Known sources are %s", fragmentId, exchangeSources.keySet());
    completeSourceFragments.add(fragmentId);
    // is the source now complete?
    if (completeSourceFragments.containsAll(remoteSource.getSourceFragmentIds())) {
        completeSources.add(remoteSource.getId());
        for (RemoteTask task : getAllTasks()) {
            task.noMoreSplits(remoteSource.getId());
        }
    }
}
Also used : RemoteSourceNode(io.trino.sql.planner.plan.RemoteSourceNode) RemoteTask(io.trino.execution.RemoteTask)

Aggregations

RemoteTask (io.trino.execution.RemoteTask)26 InternalNode (io.trino.metadata.InternalNode)11 Test (org.testng.annotations.Test)11 NodeTaskMap (io.trino.execution.NodeTaskMap)9 ImmutableList (com.google.common.collect.ImmutableList)7 MockRemoteTask (io.trino.execution.MockRemoteTaskFactory.MockRemoteTask)7 PartitionedSplitsInfo (io.trino.execution.PartitionedSplitsInfo)7 PipelinedStageExecution.createPipelinedStageExecution (io.trino.execution.scheduler.PipelinedStageExecution.createPipelinedStageExecution)7 SourcePartitionedScheduler.newSourcePartitionedSchedulerAsStageScheduler (io.trino.execution.scheduler.SourcePartitionedScheduler.newSourcePartitionedSchedulerAsStageScheduler)7 Split (io.trino.metadata.Split)7 PlanFragment (io.trino.sql.planner.PlanFragment)7 ListenableFuture (com.google.common.util.concurrent.ListenableFuture)5 List (java.util.List)5 ImmutableList.toImmutableList (com.google.common.collect.ImmutableList.toImmutableList)4 ImmutableSet (com.google.common.collect.ImmutableSet)4 Duration (io.airlift.units.Duration)4 Lifespan (io.trino.execution.Lifespan)4 TaskId (io.trino.execution.TaskId)4 Optional (java.util.Optional)4 Preconditions.checkArgument (com.google.common.base.Preconditions.checkArgument)3