public static final class ConstraintSolverStrategy.ConstraintConfig extends Object
Component constraint as derived from configuration. This is backward compatible and can parse old style Config.TOPOLOGY_RAS_CONSTRAINTS and Config.TOPOLOGY_SPREAD_COMPONENTS. New style Config.TOPOLOGY_RAS_CONSTRAINTS is map where each component has a list of other incompatible components and an optional number that specifies the maximum co-location count for the component on a node.
comp-1 cannot exist on same worker as comp-2 or comp-3, and at most "2" comp-1 on same node
comp-2 and comp-4 cannot be on same worker (missing comp-1 is implied from comp-1 constraint)
{ “comp-1”: { “maxNodeCoLocationCnt”: 2, “incompatibleComponents”: [“comp-2”, “comp-3” ] }, “comp-2”: { “incompatibleComponents”: [ “comp-4” ] } }
Modifier and Type | Method and Description |
---|---|
Map<String,Set<String>> |
getIncompatibleComponents() |
Map<String,Integer> |
getMaxCoLocationCnts() |
Copyright © 2022 The Apache Software Foundation. All rights reserved.