Changeset 539 for DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks
- Timestamp:
- 10/31/12 13:52:06 (12 years ago)
- Location:
- DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/AbstractProcesses.java
r477 r539 3 3 import schedframe.scheduling.tasks.requirements.ResourceParameterName; 4 4 5 public abstract class AbstractProcesses <T> implements WorkloadUnit<T>{5 public abstract class AbstractProcesses implements WorkloadUnit{ 6 6 7 7 -
DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/Job.java
r477 r539 18 18 import schedframe.scheduling.WorkloadUnitHandler; 19 19 import schedframe.scheduling.manager.tasks.JobRegistryImpl; 20 import schedframe.scheduling.policy.AbstractManagementSystem;21 20 22 21 … … 179 178 } 180 179 181 public int getUserI D(){180 public int getUserId(){ 182 181 return this.senderId; 183 182 } … … 204 203 205 204 List<Task> readyTasks = new ArrayList<Task>(); 206 207 205 int size = tasks.size(); 206 208 207 for(int i = 0; i < size; i++){ 209 208 int parCnt; … … 216 215 } catch(Exception e){ 217 216 parCnt = 0; 218 //e.printStackTrace(); 219 } 220 if(parCnt == 0) 221 { 217 } 218 if(parCnt == 0) { 222 219 readyTasks.add(task); 223 220 } 224 else 225 { 221 else { 226 222 for(int j = 0; j < parCnt; j++){ 227 223 ParentType par = task.getDescription().getWorkflow().getParent(j); -
DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/JobInterface.java
r477 r539 11 11 * 12 12 */ 13 public interface JobInterface<T> extends WorkloadUnit <T> {13 public interface JobInterface<T> extends WorkloadUnit, DescriptionContainer<T> { 14 14 15 15 /** … … 18 18 * @throws NoSuchFieldException if there is no tasks for this job, and job id can not be obtained 19 19 */ 20 public abstract String getId() throws NoSuchFieldException;20 //public abstract String getId() throws NoSuchFieldException; 21 21 22 22 /** … … 44 44 * @return constant which represents current status of this job 45 45 */ 46 public int getStatus();46 //public int getStatus(); 47 47 48 public int getUserID();48 //public int getUserID(); 49 49 } -
DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/Processes.java
r477 r539 1 1 package schedframe.scheduling.tasks; 2 3 import java.util.List;4 2 5 3 import org.qcg.broker.schemas.resreqs.ComputingResourceBaseTypeItem; … … 196 194 } 197 195 198 public org.qcg.broker.schemas.resreqs.Processes getDescription(){ 199 return this.pr; 200 } 201 202 @Override 203 public List getTask() { 204 // TODO Auto-generated method stub 205 return null; 206 } 207 208 @Override 209 public TaskInterface getTask(String taskId) throws NoSuchFieldException { 210 // TODO Auto-generated method stub 211 return null; 212 } 213 214 @Override 215 public int getTaskCount() { 196 public int getStatus() { 197 return this.status; 198 } 199 200 @Override 201 public int getUserId() { 216 202 // TODO Auto-generated method stub 217 203 return 0; 218 204 } 219 205 220 @Override 221 public int getStatus() { 222 // TODO Auto-generated method stub 223 return 0; 224 } 225 226 @Override 227 public int getUserID() { 228 // TODO Auto-generated method stub 229 return 0; 230 } 231 232 @Override 233 public String getDocument() throws Exception { 234 // TODO Auto-generated method stub 235 return null; 236 } 206 237 207 238 208 @Override -
DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/Task.java
r477 r539 30 30 import schedframe.scheduling.WorkloadUnitHandler; 31 31 import schedframe.scheduling.manager.tasks.JobRegistryImpl; 32 import schedframe.scheduling.policy.AbstractManagementSystem;33 32 import schedframe.scheduling.tasks.requirements.ResourceParameterName; 34 33 … … 38 37 * 39 38 */ 40 public class Task /*extends AbstractTask*/implements TaskInterface<org.qcg.broker.schemas.resreqs.Task> {39 public class Task implements TaskInterface<org.qcg.broker.schemas.resreqs.Task> { 41 40 42 41 protected static Unmarshaller unmarshaller; … … 72 71 private int senderId; 73 72 private long workloadLogWaitTime; 74 //String resPathHistory; 75 73 76 74 public Task(org.qcg.broker.schemas.resreqs.Task task){ 77 75 this.task = task; … … 80 78 this.brokerSubmitTime = null; 81 79 this.duration = null; 82 // this.gridletID_ = (getJobId() + "_" + getId()).hashCode();83 80 prepareTopology(); 84 81 } … … 91 88 this.brokerSubmitTime = null; 92 89 this.duration = null; 93 // this.gridletID_ = (getJobId() + getId()).hashCode();94 90 prepareTopology(); 95 91 } … … 269 265 } 270 266 271 public String getUserD n() {267 public String getUserDN() { 272 268 return this.task.getUserDN(); 273 269 } … … 471 467 }*/ 472 468 469 473 470 @Override 474 public List <Task> getTask() { 475 List<Task> tasks = new ArrayList<Task>(); 476 tasks.add(this); 477 return tasks; 478 } 479 480 @Override 481 public Task getTask(String taskId) throws NoSuchFieldException { 482 // TODO Auto-generated method stub 483 return null; 484 } 485 486 @Override 487 public int getTaskCount() { 471 public int getUserId() { 488 472 // TODO Auto-generated method stub 489 473 return 0; 490 474 } 491 475 492 @Override493 public int getUserID() {494 // TODO Auto-generated method stub495 return 0;496 }497 498 476 public boolean isRegistered() { 499 477 return isRegistered; -
DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/TaskInterface.java
r477 r539 6 6 import org.joda.time.ReadableDuration; 7 7 8 import schedframe.DescriptionContainer; 8 9 import schedframe.scheduling.tasks.requirements.ResourceParameterName; 9 10 … … 14 15 * 15 16 */ 16 public interface TaskInterface<T> extends WorkloadUnit <T> {17 public interface TaskInterface<T> extends WorkloadUnit, DescriptionContainer<T> { 17 18 18 19 /** … … 20 21 * @return task identifier 21 22 */ 22 public abstract String getId();23 //public abstract String getId(); 23 24 24 25 /** … … 33 34 * submitted this task. 34 35 */ 35 public abstract String getUserD n();36 public abstract String getUserDN(); 36 37 37 38 /** … … 87 88 */ 88 89 public long getLength(); 89 90 /** 91 * 92 * @param length measured in instructions. 93 */ 94 public void setLength(long length); 95 90 96 91 /** 97 92 * 98 93 * @return constant which represent current task status 99 94 */ 100 public int getStatus();95 //public int getStatus(); 101 96 102 97 … … 107 102 public List<AbstractProcesses> getProcesses(AbstractProcessesGroup processGroup); 108 103 109 public void setStatus(int status) throws Exception;104 //public void setStatus(int status) throws Exception; 110 105 111 106 public double getCpuCntRequest() throws NoSuchFieldException; … … 114 109 115 110 public long getWorkloadLogWaitTime(); 116 117 //public void addToResPath(String resName); 118 119 //public String getResPath(); 111 120 112 121 113 } -
DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/WorkloadUnit.java
r477 r539 1 1 package schedframe.scheduling.tasks; 2 2 3 import java.util.List;4 5 import schedframe.DescriptionContainer;6 3 import schedframe.scheduling.WorkloadUnitHandler; 7 4 import schedframe.scheduling.manager.tasks.JobRegistryImpl; 8 import schedframe.scheduling.policy.AbstractManagementSystem;9 5 10 public interface WorkloadUnit <T> extends DescriptionContainer<T>{6 public interface WorkloadUnit { 11 7 12 /** 13 * 14 * @return job identifier 15 * @throws NoSuchFieldException if there is no tasks for this job, and job id can not be obtained 16 */ 17 public abstract String getId() throws NoSuchFieldException; 8 public String getId(); 18 9 19 /** 20 * 21 * @return list of tasks which belongs to this job 22 */ 23 public abstract List<? extends TaskInterface<?>> getTask(); 10 public int getUserId(); 24 11 25 /**26 *27 * @param taskId28 * @return task with specified taskId29 * @throws NoSuchFieldException if task with taskId does not exist in this job30 */31 public abstract TaskInterface<?> getTask(String taskId) throws NoSuchFieldException;32 33 /**34 *35 * @return number of tasks in this job36 */37 public abstract int getTaskCount();38 39 /**40 *41 * @return constant which represents current status of this job42 */43 12 public int getStatus(); 44 13 45 14 public void setStatus(int status) throws Exception; 46 15 47 16 public boolean isFinished(); 48 49 public int getUserID(); 50 17 51 18 public boolean isRegistered(); 52 19
Note: See TracChangeset
for help on using the changeset viewer.