public final class ConstraintSolverConfig extends Object
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 | Field and Description |
---|---|
static String |
CONSTRAINT_TYPE_INCOMPATIBLE_COMPONENTS |
static String |
CONSTRAINT_TYPE_MAX_NODE_CO_LOCATION_CNT |
Constructor and Description |
---|
ConstraintSolverConfig(String topoId,
Map<String,Object> topoConf,
Set<String> comps) |
ConstraintSolverConfig(TopologyDetails topo) |
Modifier and Type | Method and Description |
---|---|
Map<String,Set<String>> |
getIncompatibleComponentSets()
Return an object that maps component names to a set of other components
which are incompatible and their executor instances cannot co-exist on the
same worker.
|
Map<String,Integer> |
getMaxNodeCoLocationCnts()
Return an object that maps component names to a numeric maximum limit of
executor instances (of that component) that can exist on any node.
|
public static final String CONSTRAINT_TYPE_MAX_NODE_CO_LOCATION_CNT
public static final String CONSTRAINT_TYPE_INCOMPATIBLE_COMPONENTS
public ConstraintSolverConfig(TopologyDetails topo)
public Map<String,Set<String>> getIncompatibleComponentSets()
CONSTRAINT_TYPE_INCOMPATIBLE_COMPONENTS
constraint specified.public Map<String,Integer> getMaxNodeCoLocationCnts()
CONSTRAINT_TYPE_MAX_NODE_CO_LOCATION_CNT
constraint specified.Copyright © 2023 The Apache Software Foundation. All rights reserved.