- Timestamp:
- 06/06/14 10:48:32 (11 years ago)
- Location:
- DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/AbstractManagementSystem.java
r1362 r1377 26 26 import schedframe.scheduling.plugin.estimation.ExecutionTimeEstimationPlugin; 27 27 import schedframe.scheduling.plugin.grid.ModuleList; 28 import schedframe.scheduling. plugin.local.ResourceAllocation;28 import schedframe.scheduling.manager.resources.ResourceAllocation; 29 29 import schedframe.scheduling.queue.TaskQueue; 30 30 import schedframe.scheduling.queue.TaskQueueList; -
DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/local/LocalManagementSystem.java
r1374 r1377 238 238 Executable exec = (Executable) execTask; 239 239 Map<ResourceUnitName, ResourceUnit> lastUsed = exec.getAllocatedResources().getLast().getResourceUnits(); 240 getAllocationManager().freeResources(lastUsed );240 getAllocationManager().freeResources(lastUsed, true); 241 241 242 242 saveExecutionHistory(exec, exec.getCompletionPercentage(), exec.getEstimatedDuration()); … … 262 262 Executable exec = (Executable) execTask; 263 263 264 boolean status = allocateResources(exec, resources );264 boolean status = allocateResources(exec, resources, true); 265 265 if(status == false){ 266 266 TaskList newTasks = new TaskListImpl(); … … 332 332 333 333 Executable exec = (Executable)task; 334 boolean allocationStatus = allocateResources(exec, choosenResources );334 boolean allocationStatus = allocateResources(exec, choosenResources, false); 335 335 if(allocationStatus == false){ 336 336 log.info("Task " + task.getJobId() + "_" + task.getId() + " requires more resources than is available at this moment."); … … 417 417 418 418 Map<ResourceUnitName, ResourceUnit> lastUsed = exec.getAllocatedResources().getLast().getResourceUnits(); 419 getAllocationManager().freeResources(lastUsed );419 getAllocationManager().freeResources(lastUsed, true); 420 420 421 421 //TODO calculate the value of completion … … 727 727 } 728 728 729 public boolean allocateResources(Executable exec, Map<ResourceUnitName, ResourceUnit> choosenResources ){730 boolean allocationStatus = getAllocationManager().allocateResources(choosenResources );729 public boolean allocateResources(Executable exec, Map<ResourceUnitName, ResourceUnit> choosenResources, boolean exclusive){ 730 boolean allocationStatus = getAllocationManager().allocateResources(choosenResources, exclusive); 731 731 if(allocationStatus){ 732 732 ResourceHistoryItem resourceHistoryItem = new ResourceHistoryItem(choosenResources);
Note: See TracChangeset
for help on using the changeset viewer.