Skip to content

Commit

Permalink
Introduce NodeAllocatorService
Browse files Browse the repository at this point in the history
  • Loading branch information
losipiuk committed Mar 10, 2022
1 parent 47b77a2 commit 4ba555e
Show file tree
Hide file tree
Showing 9 changed files with 617 additions and 463 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import io.trino.exchange.ExchangeManagerRegistry;
import io.trino.execution.QueryPreparer.PreparedQuery;
import io.trino.execution.StateMachine.StateChangeListener;
import io.trino.execution.scheduler.NodeAllocatorService;
import io.trino.execution.scheduler.NodeScheduler;
import io.trino.execution.scheduler.SplitSchedulerStats;
import io.trino.execution.scheduler.SqlQueryScheduler;
Expand Down Expand Up @@ -99,6 +100,7 @@ public class SqlQueryExecution
private final SplitSourceFactory splitSourceFactory;
private final NodePartitioningManager nodePartitioningManager;
private final NodeScheduler nodeScheduler;
private final NodeAllocatorService nodeAllocatorService;
private final List<PlanOptimizer> planOptimizers;
private final PlanFragmenter planFragmenter;
private final RemoteTaskFactory remoteTaskFactory;
Expand Down Expand Up @@ -132,6 +134,7 @@ private SqlQueryExecution(
SplitSourceFactory splitSourceFactory,
NodePartitioningManager nodePartitioningManager,
NodeScheduler nodeScheduler,
NodeAllocatorService nodeAllocatorService,
List<PlanOptimizer> planOptimizers,
PlanFragmenter planFragmenter,
RemoteTaskFactory remoteTaskFactory,
Expand Down Expand Up @@ -159,6 +162,7 @@ private SqlQueryExecution(
this.splitSourceFactory = requireNonNull(splitSourceFactory, "splitSourceFactory is null");
this.nodePartitioningManager = requireNonNull(nodePartitioningManager, "nodePartitioningManager is null");
this.nodeScheduler = requireNonNull(nodeScheduler, "nodeScheduler is null");
this.nodeAllocatorService = requireNonNull(nodeAllocatorService, "nodeAllocatorService is null");
this.planOptimizers = requireNonNull(planOptimizers, "planOptimizers is null");
this.planFragmenter = requireNonNull(planFragmenter, "planFragmenter is null");
this.queryExecutor = requireNonNull(queryExecutor, "queryExecutor is null");
Expand Down Expand Up @@ -497,6 +501,7 @@ private void planDistribution(PlanRoot plan)
plan.getRoot(),
nodePartitioningManager,
nodeScheduler,
nodeAllocatorService,
remoteTaskFactory,
plan.isSummarizeTaskInfos(),
scheduleSplitBatchSize,
Expand Down Expand Up @@ -698,6 +703,7 @@ public static class SqlQueryExecutionFactory
private final SplitSourceFactory splitSourceFactory;
private final NodePartitioningManager nodePartitioningManager;
private final NodeScheduler nodeScheduler;
private final NodeAllocatorService nodeAllocatorService;
private final List<PlanOptimizer> planOptimizers;
private final PlanFragmenter planFragmenter;
private final RemoteTaskFactory remoteTaskFactory;
Expand All @@ -724,6 +730,7 @@ public static class SqlQueryExecutionFactory
SplitSourceFactory splitSourceFactory,
NodePartitioningManager nodePartitioningManager,
NodeScheduler nodeScheduler,
NodeAllocatorService nodeAllocatorService,
PlanOptimizersFactory planOptimizersFactory,
PlanFragmenter planFragmenter,
RemoteTaskFactory remoteTaskFactory,
Expand Down Expand Up @@ -751,6 +758,7 @@ public static class SqlQueryExecutionFactory
this.splitSourceFactory = requireNonNull(splitSourceFactory, "splitSourceFactory is null");
this.nodePartitioningManager = requireNonNull(nodePartitioningManager, "nodePartitioningManager is null");
this.nodeScheduler = requireNonNull(nodeScheduler, "nodeScheduler is null");
this.nodeAllocatorService = requireNonNull(nodeAllocatorService, "nodeAllocatorService is null");
this.planFragmenter = requireNonNull(planFragmenter, "planFragmenter is null");
this.remoteTaskFactory = requireNonNull(remoteTaskFactory, "remoteTaskFactory is null");
this.queryExecutor = requireNonNull(queryExecutor, "queryExecutor is null");
Expand Down Expand Up @@ -790,6 +798,7 @@ public QueryExecution createQueryExecution(
splitSourceFactory,
nodePartitioningManager,
nodeScheduler,
nodeAllocatorService,
planOptimizers,
planFragmenter,
remoteTaskFactory,
Expand Down

This file was deleted.

Loading

0 comments on commit 4ba555e

Please sign in to comment.