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

 ##########
 File path: 
heron/packing/src/java/org/apache/heron/packing/roundrobin/ResourceCompliantRRPacking.java
 ##########
 @@ -216,13 +177,18 @@ public PackingPlan repack(PackingPlan 
currentPackingPlan, Map<String, Integer> c
 
         return planBuilder.build();
 
-      } catch (ResourceExceededException e) {
-        //Not enough containers. Adjust the number of containers.
-        increaseNumContainers(1);
-        resetToFirstContainer();
+      } catch (ConstraintViolationException e) {
         LOG.info(String.format(
             "%s Increasing the number of containers to %s and attempting 
packing again.",
             e.getMessage(), this.numContainers));
+        //Not enough containers. Adjust the number of containers.
+        increaseNumContainers(1);
+        resetToFirstContainer();
+
+        int totalInstances = TopologyUtils.getTotalInstance(topology);
 
 Review comment:
   suggest to create a util function in AbstractPacking()

----------------------------------------------------------------
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