More changes for Bug 7845 - Productize DeploymentPlanner

- After applying the User concentrated Pod heuristic, order of clusters within a pod (based on capacity) should remain intact
- Only change should be clusters of which pod to be considered first
This commit is contained in:
prachi 2011-02-28 17:25:52 -08:00
parent cf68ad7bc6
commit c1f0aef550
1 changed files with 5 additions and 1 deletions

View File

@ -293,7 +293,11 @@ public class FirstFitPlanner extends PlannerBase implements DeploymentPlanner {
if(podClusterMap.containsKey(pod)){
List<Long> clustersOfThisPod = (List<Long>)podClusterMap.get(pod);
if(clustersOfThisPod != null){
reorderedClusters.addAll(clustersOfThisPod);
for(Long clusterId : clusterIds){
if(clustersOfThisPod.contains(clusterId)){
reorderedClusters.add(clusterId);
}
}
clusterIds.removeAll(clustersOfThisPod);
}
}