[GE dev] JGDI Delete task

andre Andre.Alefeld at sun.com
Tue Apr 27 09:43:58 BST 2010


Hi Petros,

I agree, it should be available in an easier usable fashion too (e.g. 
deleteJob(WithAnswer)(int jobId, int[] tasks)
I guess with the syntax below it is also possible to do something like:
qdel 1.2-20:3 to delete 2,5,8,...

try {
      int firstTask = 2;
      int lastTask = 20:
      int stepSize = 3;
      String[] tasks = new String[]{jobid + "." + firstTask + "-" + lastTask + ":" + stepSize};
      List<JGDIAnswer>  answers = new LinkedList<JGDIAnswer>();

      jgdi.deleteJobsWithAnswer(tasks, false, null, answers);
      System.out.println("deleteJobsWithAnswer: " + tasks[0]);
      for (JGDIAnswer a : answers) {
          logger.info("answer from deleteJobsWithAnswer:" + a.getText());
      }
} catch (JGDIException je) {
      je.printStackTrace();
}

Andre


On 04/26/10 20:02, ppetosy wrote:
> Hi Andre
>
> Good workaround. It worked.
>
> But still wondering why JGDI doesn't have that function ?
>
> Much thanks,
> Petros.
>
>    
>> Hi,
>>
>> it should be possible to workaround with the code similar to the one below:
>>
>> try {
>>       List<JGDIAnswer>  answers = new LinkedList<JGDIAnswer>();
>>       String[] tasks = new String[]{jobid + "." + taskid};
>>       jgdi.deleteJobsWithAnswer(tasks, false, null, answers);
>>       System.out.println("deleteJobsWithAnswer: " + tasks[0]);
>>       for (JGDIAnswer a : answers) {
>>           logger.info("answer from deleteJobsWithAnswer:" + a.getText());
>>       }
>> } catch (JGDIException je) {
>>       je.printStackTrace();
>> }
>>
>> Can you give it a try ?
>>
>> Andre
>>
>>
>> On 04/22/10 20:02, ppetosy wrote:
>>      
>>> Hi Guys
>>>
>>> I am looking in JGDI functionality and found that there is an overloaded function in Job class called removeJaTasks. However when I call this functions this doesn't remove the job-task from the Queue.
>>>
>>> I can't find any other function which will do the same as if you run in cmd line "qdel JobId.TaskId" ( i.e. "qdel 21489.2" )
>>>
>>> Please advice.
>>>
>>> Thanks,
>>> Petros.
>>>
>>> ------------------------------------------------------
>>> http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=39&dsMessageId=254485
>>>
>>> To unsubscribe from this discussion, e-mail: [dev-unsubscribe at gridengine.sunsource.net].
>>>
>>>        
>> -- 
>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>> Andre Alefeld                Phone: ++49 (0)941 3075-255
>> Software Engineering         Fax:   ++49 (0)941 3075-222
>> Sun Microsystems GmbH
>> Dr.-Leo-Ritter-Str. 7	     mailto: andre.alefeld at sun.com
>> D-93049 Regensburg           http://www.sun.com/gridware
>>      
> ------------------------------------------------------
> http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=39&dsMessageId=255024
>
> To unsubscribe from this discussion, e-mail: [dev-unsubscribe at gridengine.sunsource.net].
>    

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Andre Alefeld                Phone: ++49 (0)941 3075-255
Software Engineering         Fax:   ++49 (0)941 3075-222
Sun Microsystems GmbH
Dr.-Leo-Ritter-Str. 7	     mailto: andre.alefeld at sun.com
D-93049 Regensburg           http://www.sun.com/gridware

------------------------------------------------------
http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=39&dsMessageId=255109

To unsubscribe from this discussion, e-mail: [dev-unsubscribe at gridengine.sunsource.net].



More information about the gridengine-users mailing list