public class ConstraintSolverStrategy extends BaseResourceAwareStrategy
BaseResourceAwareStrategy.NodeSortType
cluster, compToExecs, config, execSorter, execToComp, nodes, nodeSorter, nodeSortType, orderExecutorsByProximity, searcherState, sortNodesForEachExecutor, topologyDetails, topoName
Constructor and Description |
---|
ConstraintSolverStrategy() |
Modifier and Type | Method and Description |
---|---|
protected SchedulingResult |
checkSchedulingFeasibility()
Check scheduling feasibility for a quick failure as the second step in
BaseResourceAwareStrategy.schedule(Cluster, TopologyDetails) . |
protected boolean |
isExecAssignmentToWorkerValid(ExecutorDetails exec,
WorkerSlot worker)
Check if any constraints are violated if exec is scheduled on worker.
|
protected void |
prepareForScheduling(Cluster cluster,
TopologyDetails topologyDetails)
Initialize instance variables as the first step in
BaseResourceAwareStrategy.schedule(Cluster, TopologyDetails) . |
static boolean |
validateSolution(Cluster cluster,
TopologyDetails topo)
Determines if a scheduling is valid and all constraints are satisfied (for use in testing).
|
assignBoundAckersForNewWorkerSlot, getMaxStateSearchFromTopoConf, hostnameToNodes, idToNode, isOrderByProximity, prepare, schedule, scheduleExecutorsOnNodes, setExecSorter, setNodeSorter
protected void prepareForScheduling(Cluster cluster, TopologyDetails topologyDetails)
BaseResourceAwareStrategy
BaseResourceAwareStrategy.schedule(Cluster, TopologyDetails)
.
This method may be extended by subclasses to initialize additional variables as in
prepareForScheduling(Cluster, TopologyDetails)
.prepareForScheduling
in class BaseResourceAwareStrategy
cluster
- on which executors will be scheduled.topologyDetails
- to be scheduled.protected SchedulingResult checkSchedulingFeasibility()
BaseResourceAwareStrategy
BaseResourceAwareStrategy.schedule(Cluster, TopologyDetails)
.
If scheduling is not possible, then return a SchedulingStatus object with a failure status.
If fully scheduled then return a successful SchedulingStatus.
This method can be extended by subclasses checkSchedulingFeasibility()
to check for additional failure conditions.checkSchedulingFeasibility
in class BaseResourceAwareStrategy
SchedulingResult
to terminate scheduling, otherwise return null to continue scheduling.protected boolean isExecAssignmentToWorkerValid(ExecutorDetails exec, WorkerSlot worker)
isExecAssignmentToWorkerValid
in class BaseResourceAwareStrategy
exec
- being scheduled.worker
- on which to schedule.public static boolean validateSolution(Cluster cluster, TopologyDetails topo)
ConstraintSolverConfig.getMaxNodeCoLocationCnts()
.
ConstraintSolverConfig.getIncompatibleComponentSets()
should not be put on the same worker.
cluster
- on which scheduling was done.topo
- TopologyDetails being scheduled.Copyright © 2023 The Apache Software Foundation. All rights reserved.