Package io.trino.execution.scheduler
Interface NodeSelector
-
- All Known Implementing Classes:
TopologyAwareNodeSelector,UniformNodeSelector
public interface NodeSelector
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description List<InternalNode>allNodes()SplitPlacementResultcomputeAssignments(Set<Split> splits, List<RemoteTask> existingTasks)Identifies the nodes for running the specified splits.SplitPlacementResultcomputeAssignments(Set<Split> splits, List<RemoteTask> existingTasks, BucketNodeMap bucketNodeMap)Identifies the nodes for running the specified splits based on a precomputed fixed partitioning.voidlockDownNodes()InternalNodeselectCurrentNode()default List<InternalNode>selectRandomNodes(int limit)List<InternalNode>selectRandomNodes(int limit, Set<InternalNode> excludedNodes)
-
-
-
Method Detail
-
lockDownNodes
void lockDownNodes()
-
allNodes
List<InternalNode> allNodes()
-
selectCurrentNode
InternalNode selectCurrentNode()
-
selectRandomNodes
default List<InternalNode> selectRandomNodes(int limit)
-
selectRandomNodes
List<InternalNode> selectRandomNodes(int limit, Set<InternalNode> excludedNodes)
-
computeAssignments
SplitPlacementResult computeAssignments(Set<Split> splits, List<RemoteTask> existingTasks)
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.
-
-