Package io.trino.execution.scheduler
Interface NodeSelector
- All Known Implementing Classes:
TopologyAwareNodeSelector,UniformNodeSelector
public interface NodeSelector
-
Method Summary
Modifier and TypeMethodDescriptionallNodes()computeAssignments(Set<Split> splits, List<RemoteTask> existingTasks) Identifies the nodes for running the specified splits.computeAssignments(Set<Split> splits, List<RemoteTask> existingTasks, BucketNodeMap bucketNodeMap) Identifies the nodes for running the specified splits based on a precomputed fixed partitioning.voiddefault List<InternalNode> selectRandomNodes(int limit) selectRandomNodes(int limit, Set<InternalNode> excludedNodes)
-
Method Details
-
lockDownNodes
void lockDownNodes() -
allNodes
List<InternalNode> allNodes() -
selectCurrentNode
InternalNode selectCurrentNode() -
selectRandomNodes
-
selectRandomNodes
-
computeAssignments
Identifies the nodes for running the specified splits.- Parameters:
splits- the splits that need to be assigned to nodes- Returns:
- a multimap from node to splits only for splits for which we could identify a node to schedule on. If we cannot find an assignment for a split, it is not included in the map. Also returns a future indicating when to reattempt scheduling of this batch of splits, if some of them could not be scheduled.
-
computeAssignments
SplitPlacementResult computeAssignments(Set<Split> splits, List<RemoteTask> existingTasks, BucketNodeMap bucketNodeMap) Identifies the nodes for running the specified splits based on a precomputed fixed partitioning.- Parameters:
splits- the splits that need to be assigned to nodes- Returns:
- a multimap from node to splits only for splits for which we could identify a node with free space. If we cannot find an assignment for a split, it is not included in the map. Also returns a future indicating when to reattempt scheduling of this batch of splits, if some of them could not be scheduled.
-