- Timestamp:
- 06/23/14 16:57:26 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/local/LocalManagementSystem.java
r1385 r1392 353 353 354 354 PEUnit peUnit = (PEUnit)choosenResources.get(StandardResourceUnitName.PE); 355 updateComputingResources(peUnit, EnergyEventType. TASK_STARTED, exec);355 updateComputingResources(peUnit, EnergyEventType.RESOURCE_UTILIZATION_CHANGED, exec); 356 356 357 357 … … 435 435 log.debug(execTask.getJobId() + "_" + execTask.getId() + " finished execution on " + new DateTime()); 436 436 log.info(DCWormsConstants.USAGE_MEASURE_NAME + ": " + calculateTotalLoad()); 437 438 updateComputingResources(peUnit, EnergyEventType.RESOURCE_UTILIZATION_CHANGED, exec); 437 439 } 438 440 … … 702 704 703 705 704 p ublicvoid saveExecutionHistory(Executable exec, double completionPercentage, double estimatedDuration){706 private void saveExecutionHistory(Executable exec, double completionPercentage, double estimatedDuration){ 705 707 706 708 ExecutionHistoryItem execHistoryItem = new ExecutionHistoryItem(new DateTime()); … … 711 713 exec.addExecHistory(execHistoryItem); 712 714 715 } 716 717 public boolean allocateResources(Executable exec, Map<ResourceUnitName, ResourceUnit> choosenResources, boolean exclusive){ 718 boolean allocationStatus = getAllocationManager().allocateResources(choosenResources, exclusive); 719 if(allocationStatus){ 720 ResourceHistoryItem resourceHistoryItem = new ResourceHistoryItem(choosenResources); 721 exec.addAllocatedResources(resourceHistoryItem); 722 saveResourceHistory(exec); 723 return true; 724 } 725 return false; 726 } 727 728 private void saveResourceHistory(Executable exec){ 713 729 ProcessingElements pes = (ProcessingElements) exec.getAllocatedResources().getLast().getResourceUnits().get(StandardResourceUnitName.PE); 714 730 for (ComputingResource resource : pes) { … … 735 751 } 736 752 737 public boolean allocateResources(Executable exec, Map<ResourceUnitName, ResourceUnit> choosenResources, boolean exclusive){738 boolean allocationStatus = getAllocationManager().allocateResources(choosenResources, exclusive);739 if(allocationStatus){740 ResourceHistoryItem resourceHistoryItem = new ResourceHistoryItem(choosenResources);741 exec.addAllocatedResources(resourceHistoryItem);742 return true;743 }744 return false;745 }746 753 }
Note: See TracChangeset
for help on using the changeset viewer.