code: @Override
    public PackingPlan repack(PackingPlan currentPackingPlan, Map<String, Integer> componentChanges)
        throws PackingException {
      int initialNumContainer = TopologyUtils.getNumContainers(topology);
      int initialNumInstance = TopologyUtils.getTotalInstance(topology);
      double initialNumInstancePerContainer = (double) initialNumInstance / initialNumContainer;
  
      Map<String, Integer> newComponentParallelism =
          getNewComponentParallelism(currentPackingPlan, componentChanges);
  
      int newNumInstance = TopologyUtils.getTotalInstance(newComponentParallelism);
      int newNumContainer = (int) Math.ceil(newNumInstance / initialNumInstancePerContainer);
      return packInternal(newNumContainer, newComponentParallelism);
    }
docs: Read the current packing plan with update parallelism to calculate a new packing plan.
  This method should determine a new number of containers based on the updated parallism
  while remaining the number of instances per container <= that of the old packing plan.
  The packing algorithm packInternal() is shared with pack()
  delegate to packInternal() with the new container count and component parallelism
  
  @param currentPackingPlan Existing packing plan
  @param componentChanges Map &lt; componentName, new component parallelism &gt;
  that contains the parallelism for each component whose parallelism has changed.
  @return new packing plan
  @throws PackingException