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<InternalNode> |
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() |
InternalNode |
selectCurrentNode() |
List<InternalNode> |
selectRandomNodes(int limit,
Set<InternalNode> excludedNodes) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitselectRandomNodespublic 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 NodeSelectorpublic List<InternalNode> allNodes()
allNodes in interface NodeSelectorpublic InternalNode selectCurrentNode()
selectCurrentNode in interface NodeSelectorpublic List<InternalNode> selectRandomNodes(int limit, Set<InternalNode> excludedNodes)
selectRandomNodes in interface NodeSelectorpublic SplitPlacementResult computeAssignments(Set<Split> splits, List<RemoteTask> existingTasks)
NodeSelectorcomputeAssignments in interface NodeSelectorsplits - the splits that need to be assigned to nodespublic SplitPlacementResult computeAssignments(Set<Split> splits, List<RemoteTask> existingTasks, BucketNodeMap bucketNodeMap)
NodeSelectorcomputeAssignments in interface NodeSelectorsplits - the splits that need to be assigned to nodesCopyright © 2012–2019. All rights reserved.