airavata-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amila Jayasekara <thejaka.am...@gmail.com>
Subject Re: Job cancellation in GFac
Date Tue, 16 Jul 2013 16:53:27 GMT
On Tue, Jul 16, 2013 at 12:30 PM, Saminda Wijeratne <samindaw@gmail.com>wrote:

>
>
>
> On Tue, Jul 16, 2013 at 12:18 PM, Raminder Singh <raminderjsingh@gmail.com
> > wrote:
>
>> Thanks Amila for providing the details. Job cancel will be user action
>> called from API or Xbaya.  I don't think its necessarily always a workflow
>> interpreter operation.  Its will be useful if we provide an option in API
>> to cancel jobs. I have few other questions
>>
>> 1. We don't need to pass experimentid, workflowid, nodeid all the way to
>> gfac level. GFAC only need jobid to create cancel request for the job.
>> According to me getting of job id need to be done in API and only job id
>> need to be passed to this level.
>>
> +1
> At the workflow interpreter level it should be "cancel node execution"
> "cancel workflow execution" "cancel experiment". The interpreter can
> translate the node id to the gfac job id and call cancel job in the gfac
> interface.
>

Ok. Lets have a single method with job id to cancel jobs.


>
> 2. I looked into GramProvider code and did not like the dependency of
>> JobExecutionContext in these methods.  I observed you are using it get
>> security context. Is not it lightweight for the client to just set security
>> context?
>>
>
I prefer to keep JobExecutionContext as it is the medium communicating with
the GFac interface. Further if we need pass any additional parameters we
can use job execution context.

I assume Raman or Saminda will help implementing job cancellation at
interpretter level and also at API level.

Thanks
Amila


>
>> Please let me know if you have any questions.
>>
>> Thanks
>> Raminder
>>
>> On Jul 16, 2013, at 11:11 AM, Amila Jayasekara <thejaka.amila@gmail.com>
>> wrote:
>>
>> > Hi All,
>> >
>> > I have added following methods to GFacProvider interface to do job
>> cancellation. But we need to figure out from where these methods should be
>> called. As I feel these methods should get triggered from Workflow
>> Interpretter.
>> >
>> > I would like to use this mail thread to discuss how we can invoke
>> cancellation methods and how we can expose job cancellation at API.
>> >
>> > Please give feedback.
>> >
>> > Thanks
>> > Amila
>> >
>> >
>> > /**
>> >      * Cancels all jobs relevant to an experiment.
>> >      * @param experimentId The experiment id
>> >      * @param jobExecutionContext The job execution context, contains
>> runtime information.
>> >      * @throws GFacException If an error occurred while cancelling the
>> job.
>> >      */
>> >     void cancelJob(String experimentId, JobExecutionContext
>> jobExecutionContext) throws GFacException;
>> >
>> >     /**
>> >      * Cancels all jobs relevant to a workflow in an experiment.
>> >      * @param experimentId The experiment id
>> >      * @param workflowId The workflow id.
>> >      * @param jobExecutionContext The job execution context, contains
>> runtime information.
>> >      * @throws GFacException If an error occurred while cancelling the
>> job.
>> >      */
>> >     void cancelJob(String experimentId, String workflowId,
>> >                    JobExecutionContext jobExecutionContext) throws
>> GFacException;
>> >
>> >     /**
>> >      * Cancels the job for a given a workflow id and node id in an
>> experiment.
>> >      * @param experimentId The experiment id.
>> >      * @param workflowId The workflow id.
>> >      * @param nodeId The node id.
>> >      * @param jobExecutionContext The job execution context relevant to
>> cancel job operation.
>> >      * @throws GFacException If an error occurred while cancelling the
>> job.
>> >      */
>> >     void cancelJob(String experimentId, String workflowId, String
>> nodeId,
>> >                    JobExecutionContext jobExecutionContext) throws
>> GFacException;
>>
>>
>

Mime
View raw message