Github user d2r commented on a diff in the pull request:

    https://github.com/apache/incubator-storm/pull/36#discussion_r13728675
  
    --- Diff: storm-core/src/clj/backtype/storm/scheduler/EvenScheduler.clj ---
    @@ -22,7 +22,12 @@
         :implements [backtype.storm.scheduler.IScheduler]))
     
     (defn sort-slots [all-slots]
    -  (let [split-up (vals (group-by first all-slots))]
    +  (let [split-up
    +         (map second
    +           (reverse
    +             (sort
    +               (for [[host ports] (group-by first all-slots)]
    +                 [(count ports) ports]))))]
    --- End diff --
    
    Could we do something like this?
    ```
    (sort #(> (count %1) (count %2)) (vals (group-by first all-slots)))
    ```
    It would be nice to move this into its own function, so we can write a 
quick unit test for it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to