Changeset 497 for DCWoRMS/trunk/src/example/localplugin/FCFSNodePowerManagementClusterLocalPlugin.java
- Timestamp:
- 10/11/12 09:07:11 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/trunk/src/example/localplugin/FCFSNodePowerManagementClusterLocalPlugin.java
r493 r497 40 40 ClusterResourceManager resourceManager = (ClusterResourceManager) resManager; 41 41 SchedulingPlan plan = new SchedulingPlan(); 42 // chose the events types to serve. 43 // Different actions for different events are possible. 42 44 43 switch (event.getType()) { 45 44 case START_TASK_EXECUTION: 46 45 case TASK_FINISHED: 47 // our tasks are placed only in first queue (see 48 // BaseLocalPlugin.placeJobsInQueues() method) 46 49 47 TaskQueue q = queues.get(0); 50 // check all tasks in queue51 48 52 49 for (int i = 0; i < q.size(); i++) { 53 50 WorkloadUnit job = q.get(i); 54 51 TaskInterface<?> task = (TaskInterface<?>) job; 55 // if status of the tasks in READY56 52 if (task.getStatus() == DCWormsTags.READY) { 57 53 … … 65 61 } 66 62 } 67 68 63 turnOffIdleNodes(resourceManager.getComputingNodes()); 69 70 64 break; 71 65 } … … 151 145 return cpuRequest > 0 ? false : true; 152 146 } 153 154 public String getName() {155 return getClass().getName();156 }157 158 147 159 148 }
Note: See TracChangeset
for help on using the changeset viewer.