- Timestamp:
- 11/26/13 11:56:07 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/local/LocalManagementSystem.java
r1162 r1207 24 24 25 25 import qcg.shared.constants.BrokerConstants; 26 import schedframe. ResourceController;26 import schedframe.SimulatedEnvironment; 27 27 import schedframe.events.scheduling.SchedulingEvent; 28 28 import schedframe.events.scheduling.SchedulingEventType; … … 323 323 ExecTask task = iter.next(); 324 324 Executable exec = (Executable)task; 325 //exec.setCompletionPercentage(exec.getCompletionPercentage() + 100 * timeSpan/exec.getEstimatedDuration());326 325 exec.setCompletionPercentage(exec.getCompletionPercentage() + 100 * (timeSpan / exec.getEstimatedDuration())); 327 326 UsedResourcesList usedResourcesList = exec.getUsedResources(); … … 338 337 for (ComputingResource resource : pes) { 339 338 resource.handleEvent(new EnergyEvent(eventType, obj)); 339 //DataCenterWorkloadSimulator.getEventManager().sendToResources(resource.getType(), 0, new EnergyEvent(eventType, obj)); 340 340 } 341 341 /*try { … … 350 350 ComputingResource resource = null; 351 351 try { 352 resource = ResourceController.getComputingResourceByName(peUnit.getResourceId());352 resource = SimulatedEnvironment.getComputingResourceByName(peUnit.getResourceId()); 353 353 } catch (ResourceException e) { 354 354 return; … … 428 428 if(exec.getResourceConsumptionProfile().getCurrentResourceConsumption() == exec.getResourceConsumptionProfile().getResourceConsumptionList().getLast()){ 429 429 scheduler.sendInternal(phaseDuration, DCWormsTags.TASK_EXECUTION_FINISHED, execTask); 430 PEUnit peUnit = (PEUnit)exec.getUsedResources().getLast().getResourceUnits().get(StandardResourceUnitName.PE); 431 notifyComputingResources(peUnit, EnergyEventType.RESOURCE_UTILIZATION_CHANGED, exec); 430 432 } else { 431 433 scheduler.sendInternal(phaseDuration, DCWormsTags.TASK_EXECUTION_CHANGED, execTask); 434 PEUnit peUnit = (PEUnit)exec.getUsedResources().getLast().getResourceUnits().get(StandardResourceUnitName.PE); 435 notifyComputingResources(peUnit, EnergyEventType.RESOURCE_UTILIZATION_CHANGED, exec); 432 436 } 433 437 } … … 540 544 job.setStatus((int)BrokerConstants.JOB_STATUS_SUBMITTED); 541 545 } catch (Exception e) { 542 // TODO Auto-generated catch block543 546 e.printStackTrace(); 544 547 }
Note: See TracChangeset
for help on using the changeset viewer.