Ignore:
Timestamp:
11/26/13 11:56:07 (11 years ago)
Author:
wojtekp
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/local/LocalManagementSystem.java

    r1162 r1207  
    2424 
    2525import qcg.shared.constants.BrokerConstants; 
    26 import schedframe.ResourceController; 
     26import schedframe.SimulatedEnvironment; 
    2727import schedframe.events.scheduling.SchedulingEvent; 
    2828import schedframe.events.scheduling.SchedulingEventType; 
     
    323323                        ExecTask task = iter.next(); 
    324324                        Executable exec = (Executable)task; 
    325                         //exec.setCompletionPercentage(exec.getCompletionPercentage() + 100 * timeSpan/exec.getEstimatedDuration()); 
    326325                        exec.setCompletionPercentage(exec.getCompletionPercentage() + 100 * (timeSpan / exec.getEstimatedDuration())); 
    327326                        UsedResourcesList usedResourcesList = exec.getUsedResources(); 
     
    338337                        for (ComputingResource resource : pes) { 
    339338                                resource.handleEvent(new EnergyEvent(eventType, obj)); 
     339                                //DataCenterWorkloadSimulator.getEventManager().sendToResources(resource.getType(), 0, new EnergyEvent(eventType, obj)); 
    340340                        } 
    341341                        /*try { 
     
    350350                        ComputingResource resource = null; 
    351351                        try { 
    352                                 resource = ResourceController.getComputingResourceByName(peUnit.getResourceId()); 
     352                                resource = SimulatedEnvironment.getComputingResourceByName(peUnit.getResourceId()); 
    353353                        } catch (ResourceException e) { 
    354354                                return; 
     
    428428                        if(exec.getResourceConsumptionProfile().getCurrentResourceConsumption() == exec.getResourceConsumptionProfile().getResourceConsumptionList().getLast()){ 
    429429                                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); 
    430432                        } else { 
    431433                                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); 
    432436                        } 
    433437                } 
     
    540544                                        job.setStatus((int)BrokerConstants.JOB_STATUS_SUBMITTED); 
    541545                        } catch (Exception e) { 
    542                                 // TODO Auto-generated catch block 
    543546                                e.printStackTrace(); 
    544547                        } 
Note: See TracChangeset for help on using the changeset viewer.