Skip to main content
Jump to: navigation, search

Difference between revisions of "SMILA/Documentation/JobDefinitions"

Line 1: Line 1:
 +
{{note| Available since SMILA 0.9!}}
 +
 
= Jobs =
 
= Jobs =
 +
 +
<span style="color:#ff0000">'''This page is work in progress.'''</span>
 +
 
== Job Definitions ==  
 
== Job Definitions ==  
  

Revision as of 07:32, 12 July 2011

Note.png
Available since SMILA 0.9!


Jobs

This page is work in progress.

Job Definitions

The user can create a job by choosing a workflow and setting all its parameters. All parameter variables of the used data object types and workers that are not set as bucket or workflow parameters have to be set as job parameters.

Jobs are linked by sharing persistent buckets: A workflow having a start action worker with an input section is started when another workflow adds objects to the persistent bucket associated to this worker's input slot. (Note: this only works with persistent input buckets, not transient ones!)

The job definition is provided by the user. It defines the workflow to be used along with the parameters to configure the workflow.

  • name is mandatory and defines the name of the job.
    • If name is missing an exception occurs.
    • There will be an error when trying to add a job with the same name as an existing job.
  • parameters
    • This is optional and defines the job parameters that will be resolved in the workflow to configure the participating workers and instantiate the buckets.
    • All parameter (variables) that are still not set in the worker, bucket and data object type definitions used by the job workflow must be set here. Otherwise an error will occur when trying to add the job.
  • workflow
    • mandatory field. If the field is missing an exception occurs when trying to add the job.
    • references an existing workflow in the jobmanager. If the workflow with the given name does not exist, there will be an error when trying to add the job.

Sample:

{
  "name":"indexUpdateTestJob",
  "parameters":{
    "index":"wikipedia",
    "store":"wikidocs"
   },
  "workflow":"indexUpdate"
}

Monitor jobs

All jobs

Use a GET request to retrieve monitoring information for all jobs. Use POST for adding or updating a job.

Supported operations:

  • GET: Get a list of all defined job definitions and details about latest job run. Switch off details with returnDetails=false parameter. If there are no jobs defined, you will get an empty list.
  • POST: Put one new job or update existing one. If an already existing name is used, the existing job definition will be updated if validation was successful. If you update during a running job, the running job will not be influenced, but after the next start of the job the updated job definition will be used.
 If you POST more than one workflow only the first job will be added, all following workflows will be ignored.

Usage:

  • URL: http://<hostname>:8080/smila/jobmanager/jobs.
  • Allowed methods:
    • GET
    • POST
  • Response status codes:
    • 200 OK: Upon successful execution (GET).
    • 201 CREATED: Upon successful execution (POST).
    • 400 Bad Request: If you reference undefined workflows, not all parameters are resolved, mandatory fields are missing or validation finds errors you get a Bad Request (POST).

Specific job

Use a GET request to retrieve monitoring information for a specific job. Use DELETE for deleting a job.

Supported operations:

  • GET: retrieve information about a job definition with a given name.
  • DELETE: delete a job with a given name.

Usage:

  • URL: http://<hostname>:8080/smila/jobmanager/jobs/<job-name>.
  • Allowed methods:
    • GET
    • DELETE
  • Response status codes:
    • 200 OK: Upon successful execution (GET, DELETE). If the to be deleted job does not exist you will get a 200 anyway.
    • 404 Server Error: If a wrong name is used, a HTTP 404 Server Error is followed by an error in json format (GET).

Back to the top