Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
[ WORK IN PROGRESS ] | ||||||||
Line: 99 to 99 | ||||||||
Proxy DelegationIn order to register a job, the user must previously delegate a proxy into the remote CREAM CE service. The procedure is a matter of a few steps: | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Line: 108 to 108 | ||||||||
Job Registration | ||||||||
Changed: | ||||||||
< < | The steps for the 'JobRegister operation are: | |||||||
> > | The steps for the JobRegister operation are: | |||||||
| ||||||||
Line: 118 to 118 | ||||||||
| ||||||||
Changed: | ||||||||
< < | The input and output arguments of the CreamProxyFactory::make_CreamProxyRegister(...) are a bit more complicated than in the case of the Proxy Delegation. As described in the API reference, the input and output arguments are: | |||||||
> > | The input and output arguments of the CreamProxyFactory::make_CreamProxyRegister(...) are a bit more complicated than in the case of the Proxy Delegation. As described in the API reference, the input and output arguments are pointers to: | |||||||
They are typedef for (respectively): | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Changed: | ||||||||
< < | The first one is simply a C++ STL list where the user has to insert pointers to JobDescriptionWrapper objects; the second one is a complex structure based on the boost::tuple library. Each JobDescriptionWrapper object is built with a JobDescription identifier (an arbitrary string chosen by user) and other parameters that can been seen in example source code tryRegister.cpp. After the invocation of the execute(...) method, the second argument (passed to the CreamProxyFactory::make_CreamProxyRegister(...) function as output parameter) will be filled as follows: | |||||||
> > | The first one is simply a C++ STL list where the user has to insert pointers to JobDescriptionWrapper objects; the second one is a complex structure based on the boost::tuple library. Each JobDescriptionWrapper object is built with a JobDescription identifier (an arbitrary string chosen by user) and other parameters that can been seen in the example source code tryRegister.cpp. After the invocation of the execute(...) method, the second argument (passed to the CreamProxyFactory::make_CreamProxyRegister(...) function as output parameter) will be filled as follows: | |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
this tuple groups three elements:
| ||||||||
Changed: | ||||||||
< < | As shown in the example source code tryRegister.cpp, a mandatory argument is autostart. In the example it is set to false; this means that the job is ONLY REGISTERED and NOT STARTED. Below it is explained the usefulness of autostart set to false. If she/he needs to start the job immediately after registration she/he can set to true the autostart parameter. An array of properties (implemented as a std::map < string, string >, i.e. couples key -> value ) is embedded in the JobIdWrapper object returned by JobRegister operation. At the moment the only relevant property returned by CREAM is the remote path in the CE the user can send its InputSandbox to. | |||||||
> > | As shown in the example source code tryRegister.cpp, a mandatory argument is autostart. In the example it is set to false; this means that the job is ONLY REGISTERED and NOT STARTED. Below it is explained the usefulness of autostart set to false. If she/he needs to start the job immediately after registration she/he can set to true the autostart parameter. An array of properties (implemented as a std::map < string, string >, i.e. couples key -> value ) is embedded in the JobIdWrapper object returned by JobRegister operation. At the moment the only relevant property returned by CREAM is the remote path in the CE the user can send its InputSandbox to, and name 'CREAMInputSandboxURI' (see again the example source code). | |||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
Job start | ||||||||
Changed: | ||||||||
< < | In the previous example, jobs are simply registered in the CREAM CE (autostart is set to false). This is useful if the user needs to do something between job registration and job start (e.g.: sending an input sandbox in the remote path specified by the CREAM CE for each job after the registration). To explicitly start a job the user must: | |||||||
> > | In the previous example, jobs are simply registered in the CREAM CE (autostart is set to false). This is useful if the user needs to do something between job registration and job start (e.g.: sending an input sandbox in the remote path specified by the CREAM CE). To explicitly start a job the user must: | |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Added: | ||||||||
> > | Cancelling, Suspending, Resuming and Purging jobsThe code for these four operations is basically the same. The user has to
Listing jobs in a CREAM CEThe code for listing all the jobs submitted to a CREAM CE is very simple; a few simple parameters are needed for the factory CreamProxyFactory_makeCreamProxyList(...). A look at the source code should be enough to understand what the user has to do.Getting Information about jobs submitted to a CREAM CEA user can invoke two operations to get information on one or more jobs submitted to a CREAM CE: JobInfo and JobStatus. The latter is quicker but provides less information than the former. In both cases the user must prepare a JobFilterWrapper object that collects all the identifier strings of the jobs to query and the conditions the jobs must satisfy in order to be included in the result. For example a user might need the query status of all jobs submitted between 8:00am and 15:00am of a particular day (if they were not purged out yet). Or she/he might need information on all the jobs that are in the "RUNNING" OR "DONE-OK" status... and so on. Please see the documentation of JobFilterWrapper to see what filters a user can define.Fast info query (JobStatus)With the invocation of the JobStatus remote operation CREAM will return a minimal set of information about the jobs: the current status of the job, the timestamp of the last status change, the exit code of the job and the failure reason (if the job finished or aborted). To query the states of some jobs, the user must prepare a JobFilterWrapper object and fill it with JobIdWrapper objects (one for each job to query) and with other constraints to select a particular set of jobs (see the JobFilterWrapper documentation). As usual a user can query for the states of all her/his jobs; this can be achieved by using an empty vector of JobIdWrapper objects as argument of the JobFilterWrapper's costructor. See the CreamProxyFactory::make_CreamProxyStatus(...) and JobStatusWrapper documentation for more details about the structure of the information returned by CREAM. As usual the example code is the best way to explain how it works.Slow info query (JobInfo)To get complete information about jobs the user must invoke the remote call JobInfo. The procedure is much similar to the fast call JobStatus: the user has to prepare a JobFilterWrapper object to select jobs and filters; then the result will be put in a JobInfoWrapper structure instead of a JobStatusWrapper. The data structure containing the output of the JobInfo operation is very similar to that one for the JobStatus operation. See the CreamProxyFactory::make_CreamProxyInfo(...) and JobInfoWrapper documentation for more details about the structure of the information returned by CREAM. Example source code. | |||||||
[ TO BE CONTINUED ... ] -- AlviseDorigo - 2011-06-14 |