nwangtw commented on a change in pull request #3187: Consolidate Packing
URL: https://github.com/apache/incubator-heron/pull/3187#discussion_r254051084
 
 

 ##########
 File path: 
heron/packing/src/java/org/apache/heron/packing/roundrobin/ResourceCompliantRRPacking.java
 ##########
 @@ -179,13 +135,18 @@ public PackingPlan pack() {
 
         return planBuilder.build();
 
-      } catch (ResourceExceededException e) {
+      } catch (ConstraintViolationException e) {
         //Not enough containers. Adjust the number of containers.
         LOG.finest(String.format(
             "%s Increasing the number of containers to %s and attempting to 
place again.",
             e.getMessage(), this.numContainers + 1));
         increaseNumContainers(1);
         resetToFirstContainer();
+
+        int totalInstances = TopologyUtils.getTotalInstance(topology);
+        if (numContainers > totalInstances) {
 
 Review comment:
   could this happen? should we maybe shrink numContainers to the 
totalInstances?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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