nwangtw commented on a change in pull request #3187: Consolidate Packing
URL: https://github.com/apache/incubator-heron/pull/3187#discussion_r254051451
##########
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:
same as above. Maybe refactor the check into a function if necessary.
----------------------------------------------------------------
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