|
@@ -27,6 +27,7 @@ import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.Set;
|
|
|
import java.util.TreeMap;
|
|
|
+import java.util.TreeSet;
|
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
|
|
|
|
import org.apache.commons.logging.Log;
|
|
@@ -556,7 +557,7 @@ implements ResourceScheduler, CapacitySchedulerContext {
|
|
|
Map<Priority, Set<NodeInfo>> reservations = application.getAllReservations();
|
|
|
for (Map.Entry<Priority, Set<NodeInfo>> e : reservations.entrySet()) {
|
|
|
Priority priority = e.getKey();
|
|
|
- Set<NodeInfo> reservedNodes = e.getValue();
|
|
|
+ Set<NodeInfo> reservedNodes = new TreeSet<NodeInfo>(e.getValue());
|
|
|
for (NodeInfo node : reservedNodes) {
|
|
|
Resource allocatedResource =
|
|
|
application.getResourceRequest(priority, NodeManagerImpl.ANY).getCapability();
|