nwangtw commented on a change in pull request #3184: Consolidate packing code
URL: https://github.com/apache/incubator-heron/pull/3184#discussion_r253226968
##########
File path:
heron/packing/src/java/org/apache/heron/packing/roundrobin/ResourceCompliantRRPacking.java
##########
@@ -216,13 +265,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);
+ if (numContainers > totalInstances) {
Review comment:
what does it mean?
----------------------------------------------------------------
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