Github user revans2 commented on a diff in the pull request: https://github.com/apache/storm/pull/2623#discussion_r179568920 --- Diff: storm-server/src/main/java/org/apache/storm/scheduler/resource/strategies/scheduling/BaseResourceAwareStrategy.java --- @@ -477,45 +414,136 @@ protected String nodeToRack(RAS_Node node) { List<ExecutorDetails> execsScheduled = new LinkedList<>(); Map<String, Queue<ExecutorDetails>> compToExecsToSchedule = new HashMap<>(); - for (Component component : componentMap.values()) { - compToExecsToSchedule.put(component.getId(), new LinkedList<ExecutorDetails>()); + for (Map.Entry<String, Component> componentEntry: componentMap.entrySet()) { --- End diff -- Nit we only use the Component out of this and never the key, could we go back to just looping through the values like before?
---