You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@heron.apache.org by GitBox <gi...@apache.org> on 2019/01/11 07:10:03 UTC

[GitHub] xiaoyao1991 commented on a change in pull request #3152: Fix RoundRobinPacking repack with no specified numContainers

xiaoyao1991 commented on a change in pull request #3152: Fix RoundRobinPacking repack with no specified numContainers
URL: https://github.com/apache/incubator-heron/pull/3152#discussion_r247019353
 
 

 ##########
 File path: heron/packing/src/java/org/apache/heron/packing/roundrobin/RoundRobinPacking.java
 ##########
 @@ -402,11 +410,10 @@ public PackingPlan repack(PackingPlan currentPackingPlan, Map<String, Integer> c
     int initialNumInstance = TopologyUtils.getTotalInstance(topology);
     double initialNumInstancePerContainer = (double) initialNumInstance / initialNumContainer;
 
-    Map<String, Integer> currentComponentParallelism = currentPackingPlan.getComponentCounts();
     Map<String, Integer> newComponentParallelism =
         getNewComponentParallelism(currentPackingPlan, componentChanges);
 
-    int newNumInstance = TopologyUtils.getTotalInstance(currentComponentParallelism);
+    int newNumInstance = TopologyUtils.getTotalInstance(newComponentParallelism);
 
 Review comment:
   Yes, this is exactly where the problem is. Previously, it is wrongfully using the old plan's component parallelism to calculate the new number of containers, but that's always going to return the same number of containers as the old plan...

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services