xiaoyao1991 commented on a change in pull request #3187: Consolidate Packing
URL: https://github.com/apache/incubator-heron/pull/3187#discussion_r255221939
##########
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:
this is specific to RCRR, I don't think it should be abstracted to the
parent class. But it makes sense to abstract it in the RCRR?
----------------------------------------------------------------
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