Ignore:
Timestamp:
10/08/12 10:23:45 (13 years ago)
Author:
wojtekp
Message:
 
Location:
DCWoRMS/trunk/src/example/localplugin
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • DCWoRMS/trunk/src/example/localplugin/BaseLocalSchedulingPlugin.java

    r478 r481  
    1010import schedframe.resources.units.ResourceUnit; 
    1111import schedframe.resources.units.ResourceUnitName; 
    12 import schedframe.scheduling.WorkloadUnitListImpl; 
     12import schedframe.scheduling.TaskListImpl; 
    1313import schedframe.scheduling.manager.resources.ResourceManager; 
    1414import schedframe.scheduling.manager.tasks.JobRegistryImpl; 
     
    2222import schedframe.scheduling.queue.TaskQueueList; 
    2323import schedframe.scheduling.tasks.TaskInterface; 
    24 import schedframe.scheduling.tasks.WorkloadUnit; 
    2524import schemas.StringValueWithUnit; 
    2625 
     
    4645        } 
    4746         
    48         public int placeJobsInQueues(WorkloadUnitListImpl newJobs, 
     47        public int placeTasksInQueues(TaskListImpl newTasks, 
    4948                        TaskQueueList queues,  
    5049                        ResourceManager resourceManager, ModuleList moduleList) { 
     
    5352                TaskQueue queue = queues.get(0); 
    5453 
    55                 for(int i = 0; i < newJobs.size(); i++){ 
    56                         WorkloadUnit task = newJobs.get(i); 
     54                for(int i = 0; i < newTasks.size(); i++){ 
     55                        TaskInterface<?> task = newTasks.get(i); 
    5756                        queue.add(task); 
    5857                } 
  • DCWoRMS/trunk/src/example/localplugin/FCFSCPUFreqScalingClusterLocalPlugin.java

    r478 r481  
    11package example.localplugin; 
    22 
    3 import gridsim.Gridlet; 
     3import gridsim.gssim.DCWormsTags; 
     4import gssim.schedframe.scheduling.Executable; 
    45 
    56import java.util.ArrayList; 
     
    2829import schedframe.scheduling.queue.TaskQueue; 
    2930import schedframe.scheduling.queue.TaskQueueList; 
    30 import schedframe.scheduling.tasks.SubmittedTask; 
    3131import schedframe.scheduling.tasks.TaskInterface; 
    3232import schedframe.scheduling.tasks.WorkloadUnit; 
     
    3939        } 
    4040 
    41         public SchedulingPlanInterface schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry, 
     41        public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry, 
    4242                        ResourceManager resManager, ModuleList modules) { 
    4343 
     
    5858                                TaskInterface<?> task = (TaskInterface<?>) job; 
    5959                                // if status of the tasks in READY 
    60                                 if (task.getStatus() == Gridlet.READY) { 
     60                                if (task.getStatus() == DCWormsTags.READY) { 
    6161 
    6262                                        Map<ResourceUnitName, ResourceUnit> choosenResources = chooseResourcesForExecution(resourceManager, task); 
     
    7676                case TASK_FINISHED: 
    7777                        TaskFinishedEvent finEvent = (TaskFinishedEvent) event; 
    78                         SubmittedTask subTask = (SubmittedTask )jobRegistry.getSubmittedTask(finEvent.getJobId(), finEvent.getTaskId()); 
    79                         UsedResourceList<ResourceHistoryItem> usedResourcesList = subTask.getUsedResources(); 
     78                        Executable exec = (Executable) jobRegistry.getExecutable(finEvent.getJobId(), finEvent.getTaskId()); 
     79                        UsedResourceList<ResourceHistoryItem> usedResourcesList = exec.getUsedResources(); 
    8080                        ProcessingElements pes = (ProcessingElements)usedResourcesList.getLast().getResourceUnits().get(StandardResourceUnitName.PE); 
    8181                        List<Processor> processors =  new ArrayList<Processor>(); 
     
    8989                case TASK_REQUESTED_TIME_EXPIRED: 
    9090                        TaskRequestedTimeExpiredEvent timExpEvent = (TaskRequestedTimeExpiredEvent) event; 
    91                          subTask = (SubmittedTask )jobRegistry.getSubmittedTask(timExpEvent.getJobId(), timExpEvent.getTaskId()); 
    92                         usedResourcesList = subTask.getUsedResources(); 
     91                        exec = (Executable) jobRegistry.getExecutable(timExpEvent.getJobId(), timExpEvent.getTaskId()); 
     92                        usedResourcesList = exec.getUsedResources(); 
    9393                        pes = (ProcessingElements)usedResourcesList.getLast().getResourceUnits().get(StandardResourceUnitName.PE); 
    9494                        processors =  new ArrayList<Processor>(); 
     
    101101                                TaskInterface<?> task = (TaskInterface<?>) job; 
    102102                                // if status of the tasks in READY 
    103                                 if (task.getStatus() == Gridlet.READY) { 
     103                                if (task.getStatus() == DCWormsTags.READY) { 
    104104 
    105105                                        Map<ResourceUnitName, ResourceUnit> choosenResources = chooseResourcesForExecution(resourceManager, task); 
  • DCWoRMS/trunk/src/example/localplugin/FCFSClusterLocalPlugin.java

    r478 r481  
    11package example.localplugin; 
    22 
    3 import gridsim.Gridlet; 
     3import gridsim.gssim.DCWormsTags; 
    44 
    55import java.util.ArrayList; 
     
    5252                                TaskInterface<?> task = (TaskInterface<?>) job; 
    5353                                // if status of the tasks in READY 
    54                                 if (task.getStatus() == Gridlet.READY) { 
     54                                if (task.getStatus() == DCWormsTags.READY) { 
    5555                                         
    5656                                        /****************3 ways to schedule task****************/ 
  • DCWoRMS/trunk/src/example/localplugin/FCFSConsolidationClusterLocalPlugin.java

    r478 r481  
    11package example.localplugin; 
    22 
    3 import gridsim.Gridlet; 
     3import gridsim.gssim.DCWormsTags; 
    44 
    55import java.util.ArrayList; 
     
    3535        } 
    3636 
    37         public SchedulingPlanInterface schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry, 
     37        public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry, 
    3838                        ResourceManager resManager, ModuleList modules) { 
    3939 
     
    5454                                TaskInterface<?> task = (TaskInterface<?>) job; 
    5555                                // if status of the tasks in READY 
    56                                 if (task.getStatus() == Gridlet.READY) { 
     56                                if (task.getStatus() == DCWormsTags.READY) { 
    5757 
    5858                                        Map<ResourceUnitName, ResourceUnit> choosenResources = null; 
  • DCWoRMS/trunk/src/example/localplugin/FCFSEnergyAwareClusterLocalPlugin.java

    r478 r481  
    11package example.localplugin; 
    22 
    3 import gridsim.Gridlet; 
     3import gridsim.gssim.DCWormsTags; 
    44 
    55import java.util.ArrayList; 
     
    2626        } 
    2727 
    28         public SchedulingPlanInterface schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry, 
     28        public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry, 
    2929                        ResourceManager resManager, ModuleList modules) { 
    3030 
     
    4545                                TaskInterface<?> task = (TaskInterface<?>) job; 
    4646                                // if status of the tasks in READY 
    47                                 if (task.getStatus() == Gridlet.READY) { 
     47                                if (task.getStatus() == DCWormsTags.READY) { 
    4848 
    4949                                        String nodeName = chooseProviderForExecution(resourceManager, task); 
  • DCWoRMS/trunk/src/example/localplugin/FCFSNodePowerManagementClusterLocalPlugin.java

    r478 r481  
    11package example.localplugin; 
    22 
    3 import gridsim.Gridlet; 
     3import gridsim.gssim.DCWormsTags; 
    44 
    55import java.util.ArrayList; 
     
    3535        } 
    3636 
    37         public SchedulingPlanInterface schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry, 
     37        public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry, 
    3838                        ResourceManager resManager, ModuleList modules) { 
    3939 
     
    5454                                TaskInterface<?> task = (TaskInterface<?>) job; 
    5555                                // if status of the tasks in READY 
    56                                 if (task.getStatus() == Gridlet.READY) { 
     56                                if (task.getStatus() == DCWormsTags.READY) { 
    5757 
    5858                                        Map<ResourceUnitName, ResourceUnit> choosenResources = chooseResourcesForExecution(resourceManager, task); 
  • DCWoRMS/trunk/src/example/localplugin/FCFSRandomClusterLocalPlugin.java

    r478 r481  
    11package example.localplugin; 
    22 
    3 import gridsim.Gridlet; 
     3import gridsim.gssim.DCWormsTags; 
    44 
    55import java.util.List; 
     
    4747                                TaskInterface<?> task = (TaskInterface<?>) job; 
    4848                                // if status of the tasks in READY 
    49                                 if (task.getStatus() == Gridlet.READY) { 
     49                                if (task.getStatus() == DCWormsTags.READY) { 
    5050                                        /*for(ResourceUnitName key:resManager.getSharedResourceUnits().keySet()){ 
    5151                                                System.out.println(key.getName()); 
  • DCWoRMS/trunk/src/example/localplugin/FCFS_BFLocalPlugin.java

    r478 r481  
    11package example.localplugin; 
    22 
    3 import gridsim.Gridlet; 
     3import gridsim.gssim.DCWormsTags; 
    44import schedframe.events.scheduling.SchedulingEvent; 
    55import schedframe.scheduling.manager.resources.ResourceManager; 
     
    3333                                 
    3434                                // if status of the tasks in READY 
    35                                 if (task.getStatus() == Gridlet.READY) { 
     35                                if (task.getStatus() == DCWormsTags.READY) { 
    3636                                        addToSchedulingPlan(plan, task); 
    3737                                } 
  • DCWoRMS/trunk/src/example/localplugin/RackLocalPlugin.java

    r478 r481  
    11package example.localplugin; 
    22 
    3 import gridsim.Gridlet; 
     3import gridsim.gssim.DCWormsTags; 
    44import schedframe.events.scheduling.SchedulingEvent; 
    55import schedframe.scheduling.manager.resources.ClusterResourceManager; 
     
    1919        } 
    2020 
    21         public SchedulingPlanInterface schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry, 
     21        public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry, 
    2222                        ResourceManager resManager, ModuleList modules) { 
    2323 
     
    3939                                TaskInterface<?> task = (TaskInterface<?>) job; 
    4040                                // if status of the tasks in READY 
    41                                 if (task.getStatus() == Gridlet.READY) { 
     41                                if (task.getStatus() == DCWormsTags.READY) { 
    4242                                        System.out.println(resourceManager.getSchedulers().get(0).get_name()); 
    4343                                        String nodeName = resourceManager.getSchedulers().get(0).get_name(); 
Note: See TracChangeset for help on using the changeset viewer.