[saga-rg] ISSUE 90

Andre Merzky andre at merzky.net
Thu Jun 22 09:20:01 CDT 2006


Hi Graeme, 

thanks for that list, that looks most sensible to me.  I
think that the exception on create_job should indeed be
BadParameter, as you consider in your comment, as it is more
specific than NoSuccess.  Getting valid parameters, I don't
see any reason why that should ever fail, apart from memory
errors and such...

Another addition I made in the spec is that whenever
authent. and author. can fail, also PermissionDenied can be
thrown.  The line between AuthorizationFailed and
PermissionDenied is thin, and I am not sure if (a) we
need/should distinguish them, and (b) if the distinction is
made clear enough in the spec.  The spec says:

  AuthorizationFailed:
  --------------------

    An operation failed because none of the available contexts
    of the used session could be used for successful
    Authorization. That error indicates that the resource could
    not be accessed at all, and not that an operation was not
    available due to restricted permissions.  The authentification
    step has been completed successfully.

    Example:
     - although a certificate was valid on a remote GridFTP
       server, the ID could not be mapped to a valid local
       user ID.


  PermissionDenied:
  ------------------

    A operation failed because the identity used for the
    operation did not have sufficient permissions to perform
    the operation successfully.  The authentification and
    authorization steps have been completed successfully.

    Example:
     - although a user could login to a remote host via
       GridFTP and could be mapped to a local user, the write
       on /etc/passwd failed.

Thanks, Andre.


Quoting [G.E.POUND at soton.ac.uk] (Apr 25 2006):
> Date: Tue, 25 Apr 2006 12:43:23 +0100
> From: G.E.POUND at soton.ac.uk
> To: Andre Merzky <andre at merzky.net>, SAGA RG <saga-rg at ggf.org>
> Subject: Re: [saga-rg] ISSUE 90
> 
> Andre,
> 
> Please find attached comments on the Exceptions thrown by the methods of
> JobService and Job in the Java bindings (including changes that I must
> implement).
> 
> Most are quite straight-forward, apart from JobService.createJob().
> 
> Graeme
> 
> 
> 
> Quoting Andre Merzky <andre at merzky.net>:
> 
> > That would be useful!  Malcolm should also have some idea on
> > what error handling is exposed by his implementation, that
> > might be useful as well.
> >
> > Our implementation has no job so far *sigh*.
> >
> > Thanks, Andre.
> >
> >
> > Quoting [G.E.POUND at soton.ac.uk] (Apr 20 2006):
> > >
> > > I can feedback the exceptions that I found essential from the Job
> > package in
> > > the Java bindings.
> > >
> > > Graeme
> > >
> > >
> > >
> > > Quoting Andre Merzky <andre at merzky.net>:
> > >
> > > >   90) exceptions missing in job!
> > > >       - OPEN, URGENT
> > > >
> > > > Well, that says it all.
> > > >
> > > > Volonteers?
> > > >
> > > > Cheers, Andre.
> > > >
> > > >
> > > > --
> > > > "So much time, so little to do..."  -- Garfield
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> >
> >
> >
> > --
> > "So much time, so little to do..."  -- Garfield
> >
> >
> >
> 
> 
> 
> 
> 

> 
> #####################################################
> 
> createJob
> 
> public Job createJob(JobDefinition jobDef)
>               throws NoSuccess
> 
>     Create a Job object.
> 
>     Throws:
>         NoSuccess
> 
> GEP: NoSuccess will be thrown for invalid attributes when parsing JobDef, perhaps this should be BadParameter
> 
> GEP: Is it expected that Grid communication will take place following invocation of this method. In both my local and GridSAM implementations this method acts as a factory for Job objects, communication with GridSAM service only takes place upon invocation of Job.run(). Is there any need to define the AuthentificationFailed and AuthorizationFailed exceptions for this method?
> 
> #####################################################
> 
> runJob
> 
> public Job runJob(java.lang.String host,
>                   java.lang.String commandline)
>            throws NoSuccess
> 
> GEP: TODO: throws AuthentificationFailed
> GEP: TODO: throws AuthorizationFailed
> GEP: NoSuccess will encompass a wide range of possible exceptions, is a more fine grained description required, for example host/service not available 
> 
> #####################################################
> 
> 
> list
> 
> public java.lang.String[] list()
> 
>     Get a list of jobs which are currently known by the resource manager. 
> 
> GEP: no Exceptions
> 
> #####################################################
> 
> 
> getJob
> 
> public Job getJob(java.lang.String jobID)
> 
>     Given a job identifier, this method returns a Job object representing this job.
> 
> GEP: TODO: Throws DoesNotExist for invalid JobID 
> 
> 

> 
> What about task.run() exceptions, I guess that AuthentificationFailed, AuthorizationFailed exceptions should be contained within NoSuccess?
> 
> 
> 
> #####################################################
> 
> getJobId
> 
> public java.lang.String getJobId()
> 
>     Get the resource managers representation of the job identifier.
> 
> 
> GEP: TODO: throws IncorrectState if invoked before run()
> 
> #####################################################
> 
> getJobState
> 
> public JobState getJobState()
> 
>     Retrieve the current state of a submitted job.
> 
> 
> GEP: no Exceptions
> 
> #####################################################
> 
> getJobStateDetail
> 
> public java.lang.String getJobStateDetail()
> 
> GEP: no Exceptions
> 
> #####################################################
> 
> getJobDefinition
> 
> public JobDefinition getJobDefinition()
> 
>     Retrieve the JobDefinition which was used to submit this job instance.
> 
> GEP: no Exceptions
> 
> #####################################################
> 
> suspend
> 
> public void suspend()
>              throws NotImplemented
> 
>     Throws:
>         NotImplemented
> 
> 
> GEP: TODO: throws IncorrectState if invoked when suspended
> GEP: TODO: throws NoSuccess if operation failed 
> GEP: TODO: throws AuthentificationFailed
> GEP: TODO: throws AuthorizationFailed 
> 
> 
> #####################################################
> 
> resume
> 
> public void resume()
>             throws NotImplemented
> 
>     Ask the resource manager to perform a resume operation on the running job.
> 
>     Throws:
>         NotImplemented
> 
> 
> GEP: TODO: throws IncorrectState if invoked when not suspended
> GEP: TODO: throws NoSuccess if operation failed 
> GEP: TODO: throws AuthentificationFailed
> GEP: TODO: throws AuthorizationFailed 
> #####################################################
> 
> checkpoint
> 
> public void checkpoint()
>                 throws NotImplemented
> 
>     Ask the resource manager to initiate a checkpoint operation on a running job.
> 
>     Throws:
>         NotImplemented
> 
> GEP: TODO: throws NoSuccess if operation failed 
> GEP: TODO: throws AuthentificationFailed
> GEP: TODO: throws AuthorizationFailed 
> #####################################################
> 
> migrate
> 
> public void migrate(JobDefinition jobDef)
>              throws NotImplemented
> 
>     Ask the resource manager to migrate a running job to another host.
> 
>     Throws:
>         NotImplemented
> 
> GEP: TODO: throws NoSuccess if operation failed 
> GEP: TODO: throws AuthentificationFailed
> GEP: TODO: throws AuthorizationFailed 
> #####################################################
> 
> terminate
> 
> public void terminate()
>                throws NotImplemented
> 
>     Ask the resource manager to terminate a dispatched job.
> 
>     Throws:
>         NotImplemented
> 
> GEP: TODO: throws NoSuccess if operation failed 
> GEP: TODO: throws AuthentificationFailed
> GEP: TODO: throws AuthorizationFailed 
> #####################################################
> 
> signal
> 
> public void signal(int signum)
>             throws NotImplemented
> 
>     Ask the resource manager to deliver an arbitrary signal to a dispatched job.
> 
>     Throws:
>         NotImplemented
> 
> GEP: TODO: throws NoSuccess if operation failed 
> GEP: TODO: throws AuthentificationFailed
> GEP: TODO: throws AuthorizationFailed 
> #####################################################
> 
> getStdin
> 
> public java.io.OutputStream getStdin()
>                               throws NoSuccess,
>                                      NotImplemented
> 
>     Throws:
>         NoSuccess 
>         NotImplemented
> 
> 
> #####################################################
> 
> getStdout
> 
> public java.io.InputStream getStdout()
>                               throws NoSuccess,
>                                      NotImplemented
> 
>     Throws:
>         NoSuccess 
>         NotImplemented
> 
> 
> #####################################################
> 
> getStderr
> 
> public java.io.InputStream getStderr()
>                               throws NoSuccess,
>                                      NotImplemented
> 
>     Throws:
>         NoSuccess 
>         NotImplemented
> 
> 




-- 
"So much time, so little to do..."  -- Garfield





More information about the saga-rg mailing list