public class TopologyAwareNodeSelector extends Object implements NodeSelector
Constructor and Description |
---|
TopologyAwareNodeSelector(InternalNodeManager nodeManager,
NodeTaskMap nodeTaskMap,
boolean includeCoordinator,
com.google.common.base.Supplier<NodeMap> nodeMap,
int minCandidates,
int maxSplitsPerNode,
int maxPendingSplitsPerTask,
List<io.airlift.stats.CounterStat> topologicalSplitCounters,
List<String> networkLocationSegmentNames,
NetworkLocationCache networkLocationCache) |
Modifier and Type | Method and Description |
---|---|
List<Node> |
allNodes() |
SplitPlacementResult |
computeAssignments(Set<Split> splits,
List<RemoteTask> existingTasks)
Identifies the nodes for running the specified splits.
|
SplitPlacementResult |
computeAssignments(Set<Split> splits,
List<RemoteTask> existingTasks,
BucketNodeMap bucketNodeMap)
Identifies the nodes for running the specified splits based on a precomputed fixed partitioning.
|
void |
lockDownNodes() |
Node |
selectCurrentNode() |
List<Node> |
selectRandomNodes(int limit,
Set<Node> excludedNodes) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
selectRandomNodes
public TopologyAwareNodeSelector(InternalNodeManager nodeManager, NodeTaskMap nodeTaskMap, boolean includeCoordinator, com.google.common.base.Supplier<NodeMap> nodeMap, int minCandidates, int maxSplitsPerNode, int maxPendingSplitsPerTask, List<io.airlift.stats.CounterStat> topologicalSplitCounters, List<String> networkLocationSegmentNames, NetworkLocationCache networkLocationCache)
public void lockDownNodes()
lockDownNodes
in interface NodeSelector
public List<Node> allNodes()
allNodes
in interface NodeSelector
public Node selectCurrentNode()
selectCurrentNode
in interface NodeSelector
public List<Node> selectRandomNodes(int limit, Set<Node> excludedNodes)
selectRandomNodes
in interface NodeSelector
public SplitPlacementResult computeAssignments(Set<Split> splits, List<RemoteTask> existingTasks)
NodeSelector
computeAssignments
in interface NodeSelector
splits
- the splits that need to be assigned to nodespublic SplitPlacementResult computeAssignments(Set<Split> splits, List<RemoteTask> existingTasks, BucketNodeMap bucketNodeMap)
NodeSelector
computeAssignments
in interface NodeSelector
splits
- the splits that need to be assigned to nodesCopyright © 2012–2019. All rights reserved.