bipinprasad commented on a change in pull request #3215: Storm3585 - New 
compact Constraint config including maxCoLocationCnt
URL: https://github.com/apache/storm/pull/3215#discussion_r386759562
 
 

 ##########
 File path: 
storm-server/src/main/java/org/apache/storm/scheduler/resource/strategies/scheduling/ConstraintSolverStrategy.java
 ##########
 @@ -45,64 +45,142 @@
     //hard coded max number of states to search
     private static final Logger LOG = 
LoggerFactory.getLogger(ConstraintSolverStrategy.class);
 
-    //constraints and spreads
-    private Map<String, Map<String, Integer>> constraintMatrix;
-    private HashSet<String> spreadComps = new HashSet<>();
+    /**
+     * 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": [ 2, "comp-2", "comp-3" ], # comp-1 cannot exist on 
same node as comp-2 or comp-3, and at most 2 comp-1 same node
 
 Review comment:
   Updated Config.java, ConfigValidationAnnotations.java, 
ConfigValidations.java, ConstraintSolverStrategy and 
TestConstraintSolverStrategy.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to