meetjain74 opened a new issue, #8708: URL: https://github.com/apache/storm/issues/8708
The issue is a follow up to issue https://github.com/apache/storm/issues/8704 @rzo1 Currently, the isolation scheduler sorts the machines in decreasing order of assignable slots (total slots available). As the condition written in code is: ```java // returns list of list of slots, reverse sorted by number of slots private LinkedList<HostAssignableSlots> hostAssignableSlots(Cluster cluster) { List<WorkerSlot> assignableSlots = cluster.getAssignableSlots(); // getAssignableSlots here -> primary sort // ..... // Sort Assignable slots by reverse number of slots List<HostAssignableSlots> sortHostAssignSlots = new ArrayList<HostAssignableSlots>(); for (Map.Entry<String, List<WorkerSlot>> entry : hostAssignableSlots.entrySet()) { sortHostAssignSlots.add(new HostAssignableSlots(entry.getKey(), entry.getValue())); } Collections.sort(sortHostAssignSlots, new Comparator<HostAssignableSlots>() { @Override public int compare(HostAssignableSlots o1, HostAssignableSlots o2) { return o2.getWorkerSlots().size() - o1.getWorkerSlots().size(); } }); return new LinkedList<HostAssignableSlots>(sortHostAssignSlots); } ``` Why was the design choice taken to use `getAssignableSlots` instead of `getAvailableSlots` which takes number of free slots in consideration? If we sort by `getAvailableSlots`, we would choose machines with more number of free slots and have the less number of evictions. My idea is that we can have a secondary sort where we check `getAvailableSlots` post `getAssignableSlots` in IsolationScheduler? -- 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]
