Github user revans2 commented on a diff in the pull request: https://github.com/apache/storm/pull/2385#discussion_r147237442 --- Diff: storm-server/src/main/java/org/apache/storm/scheduler/resource/ResourceUtils.java --- @@ -189,13 +201,20 @@ private static void checkInitCpu(Map<String, Double> topologyResources, String c null); topologyResources.put(Config.TOPOLOGY_COMPONENT_CPU_PCORE_PERCENT, topoCpu); } - LOG.debug("Topology Resources {}", topologyResources); + + // If resource is also present in resources map will overwrite the above + if (jsonObject.containsKey(Config.TOPOLOGY_COMPONENT_RESOURCES_MAP)) { + topologyResources.putAll((Map<String, Double>) jsonObject.get(Config.TOPOLOGY_COMPONENT_RESOURCES_MAP)); + } + LOG.info("Topology Resources {}", topologyResources); } } catch (ParseException e) { LOG.error("Failed to parse component resources is:" + e.toString(), e); return null; } - return topologyResources; + LOG.info("Topology Resources {}", normalizedResourceMap(topologyResources)); + LOG.info("Topology Resources {}", normalizedResourceMap(topologyResources)); --- End diff -- Why do we need to log this twice? or at all?
---