diff --git a/storm-core/src/clj/backtype/storm/scheduler/DefaultScheduler.clj b/storm-core/src/clj/backtype/storm/scheduler/DefaultScheduler.clj index bbec50e6f..54a9bbd4e 100644 --- a/storm-core/src/clj/backtype/storm/scheduler/DefaultScheduler.clj +++ b/storm-core/src/clj/backtype/storm/scheduler/DefaultScheduler.clj @@ -55,8 +55,8 @@ (not= alive-executors all-executors)) (bad-slots alive-assigned (count all-executors) total-slots-to-use) [])]] - (.freeSlots cluster bad-slots) - (EvenScheduler/schedule-topologies-evenly (Topologies. {topology-id topology}) cluster)))) + (.freeSlots cluster bad-slots)) + (EvenScheduler/schedule-topologies-evenly (Topologies. {topology-id topology}) cluster))) (defn -schedule [this ^Topologies topologies ^Cluster cluster] (default-schedule topologies cluster)) diff --git a/storm-core/src/jvm/backtype/storm/scheduler/SchedulerAssignmentImpl.java b/storm-core/src/jvm/backtype/storm/scheduler/SchedulerAssignmentImpl.java index cf2882b60..752371360 100644 --- a/storm-core/src/jvm/backtype/storm/scheduler/SchedulerAssignmentImpl.java +++ b/storm-core/src/jvm/backtype/storm/scheduler/SchedulerAssignmentImpl.java @@ -2,7 +2,7 @@ import java.util.ArrayList; import java.util.Collection; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.HashSet; import java.util.List; import java.util.Map; @@ -21,7 +21,7 @@ public class SchedulerAssignmentImpl implements SchedulerAssignment { public SchedulerAssignmentImpl(String topologyId, Map executorToSlots) { this.topologyId = topologyId; - this.executorToSlot = new HashMap(0); + this.executorToSlot = new LinkedHashMap(0); if (executorToSlots != null) { this.executorToSlot.putAll(executorToSlots); } @@ -90,4 +90,4 @@ public Map getExecutorToSlot() { public Set getExecutors() { return this.executorToSlot.keySet(); } -} \ No newline at end of file +}