Source:
<code>void updateTopologyHandler(String topologyName, Config updateConfig) throws TopologyRuntimeManagementException, PackingException, UpdateDryRunResponse { assert !potentialStaleExecutionData; String newParallelism = updateConfig.getStringValue(RUNTIME_MANAGER_COMPONENT_PARALLELISM_KEY); <START> LOG.info("newParallelism " + newParallelism); <END> String newContainerNumber = updateConfig.getStringValue(RUNTIME_MANAGER_CONTAINER_NUMBER_KEY); LOG.info("newContainerNumber " + newContainerNumber); String userRuntimeConfig = updateConfig.getStringValue(RUNTIME_MANAGER_RUNTIME_CONFIG_KEY); LOG.info("userRuntimeConfig " + userRuntimeConfig); if (((newParallelism != null && !newParallelism.isEmpty()) || (newContainerNumber != null && !newContainerNumber.isEmpty())) && userRuntimeConfig != null && !userRuntimeConfig.isEmpty()) { throw new TopologyRuntimeManagementException( "parallelism or container number " + "and runtime config can not be updated at the same time."); } if (userRuntimeConfig != null && !userRuntimeConfig.isEmpty()) { updateTopologyUserRuntimeConfig(topologyName, userRuntimeConfig); } else if (newContainerNumber != null && !newContainerNumber.isEmpty()) { int newContainers = Integer.parseInt(newContainerNumber); Map<String, Integer> changeRequests = new HashMap<String, Integer>(); if (newParallelism != null && !newParallelism.isEmpty()) { changeRequests = parseNewParallelismParam(newParallelism); } updatePackingPlan(topologyName, newContainers, changeRequests); } else if (newParallelism != null && !newParallelism.isEmpty()) { updateTopologyComponentParallelism(topologyName, newParallelism); } else { throw new TopologyRuntimeManagementException("Missing arguments. Not taking action."); } LOG.fine("Scheduler updated topology successfully."); }</code><technical_language>If logs for testing purpose, remove them. If kept, merge line. LOG.info(parallelise, container, runtimeConfig)</technical_language>

Target:
void updateTopologyHandler(String topologyName, Config updateConfig) throws TopologyRuntimeManagementException, PackingException, UpdateDryRunResponse { assert !potentialStaleExecutionData; String newParallelism = updateConfig.getStringValue(RUNTIME_MANAGER_COMPONENT_PARALLELISM_KEY); String newContainerNumber = updateConfig.getStringValue(RUNTIME_MANAGER_CONTAINER_NUMBER_KEY); String userRuntimeConfig = updateConfig.getStringValue(RUNTIME_MANAGER_RUNTIME_CONFIG_KEY); LOG.info("userRuntimeConfig " + userRuntimeConfig + "; newParallelism " + newParallelism + "; newContainerNumber " + newContainerNumber); if (((newParallelism != null && !newParallelism.isEmpty()) || (newContainerNumber != null && !newContainerNumber.isEmpty())) && userRuntimeConfig != null && !userRuntimeConfig.isEmpty()) { throw new TopologyRuntimeManagementException( "parallelism or container number " + "and runtime config can not be updated at the same time."); } if (userRuntimeConfig != null && !userRuntimeConfig.isEmpty()) { updateTopologyUserRuntimeConfig(topologyName, userRuntimeConfig); } else if (newContainerNumber != null && !newContainerNumber.isEmpty()) { updateTopologyContainerCount(topologyName, newContainerNumber, newParallelism); } else if (newParallelism != null && !newParallelism.isEmpty()) { updateTopologyComponentParallelism(topologyName, newParallelism); } else { throw new TopologyRuntimeManagementException("Missing arguments. Not taking action."); } LOG.fine("Scheduler updated topology successfully."); }