reiabreu commented on code in PR #8709:
URL: https://github.com/apache/storm/pull/8709#discussion_r3329055940
##########
storm-server/src/main/java/org/apache/storm/scheduler/IsolationScheduler.java:
##########
@@ -316,14 +321,36 @@ private LinkedList<HostAssignableSlots>
hostAssignableSlots(Cluster cluster) {
}
slots.add(slot);
}
+
+ final Map<String, Integer> hostFreeSlotCount = new HashMap<String,
Integer>();
+ for (WorkerSlot slot : cluster.getAvailableSlots()) {
+ String host = cluster.getHost(slot.getNodeId());
+ if (hostAssignableSlots.containsKey(host)) {
Review Comment:
can we iterate over hostAssignableSlots in the outer loop? This will reduce
the number of iterations, since hostAssignableSlots contains the target hosts
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]