public class ConstraintSolverStrategy extends BaseResourceAwareStrategy
BaseResourceAwareStrategy.NodeSortTypecluster, 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).
|
getMaxStateSearchFromTopoConf, hostnameToNodes, idToNode, isOrderByProximity, prepare, schedule, scheduleExecutorsOnNodes, setExecSorter, setNodeSorterprotected void prepareForScheduling(Cluster cluster, TopologyDetails topologyDetails)
BaseResourceAwareStrategyInitialize instance variables as the first step in BaseResourceAwareStrategy.schedule(Cluster, TopologyDetails). This method may be extended by subclasses to initialize additional variables as in prepareForScheduling(Cluster, TopologyDetails).
prepareForScheduling in class BaseResourceAwareStrategycluster - on which executors will be scheduled.topologyDetails - to be scheduled.protected SchedulingResult checkSchedulingFeasibility()
BaseResourceAwareStrategyCheck scheduling feasibility for a quick failure as the second step in 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 BaseResourceAwareStrategySchedulingResult to terminate scheduling, otherwise return null to continue scheduling.protected boolean isExecAssignmentToWorkerValid(ExecutorDetails exec, WorkerSlot worker)
Check if any constraints are violated if exec is scheduled on worker.
isExecAssignmentToWorkerValid in class BaseResourceAwareStrategyexec - being scheduled.worker - on which to schedule.public static boolean validateSolution(Cluster cluster, TopologyDetails topo)
Determines if a scheduling is valid and all constraints are satisfied (for use in testing). This is done in three steps.
ConstraintSolverConfig.getMaxNodeCoLocationCnts().
ConstraintSolverConfig.getIncompatibleComponentSets() should not be put on the same worker.
cluster - on which scheduling was done.topo - TopologyDetails being scheduled.Copyright © 2021 The Apache Software Foundation. All rights reserved.