Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "SMILA/Documentation/JobRuns"

(New page: = Jobs = == Job Runs == === Start Job Run === ==== Standard Mode ==== Use a POST request to start a job run. '''Supported operations:''' *POST: start job run. '''Usage:''' *URL: ...)
 
(Standard Mode)
Line 14: Line 14:
 
'''Usage:'''  
 
'''Usage:'''  
  
*URL: <tt><nowiki>http://<hostname>:8080/smila/jobmanager/jobs/<job-name></tt>.  
+
*URL: <tt><nowiki>http://<hostname>:8080/smila/jobmanager/jobs/<job-name></nowiki></tt>.  
 
*Allowed methods:  
 
*Allowed methods:  
 
**POST
 
**POST

Revision as of 07:24, 7 July 2011

Jobs

Job Runs

Start Job Run

Standard Mode

Use a POST request to start a job run.

Supported operations:

  • POST: start job run.

Usage:

  • URL: http://<hostname>:8080/smila/jobmanager/jobs/<job-name>.
  • Allowed methods:
    • POST
  • Response status codes:
    • 200 OK: Upon successful execution. A JSON object with jobId and url will be returned. This starts a job run that waits for input: it has either a bulkSource worker as its start action that listens on some API and requests tasks when it needs one (e.g. BulkBuilder) or it waits for changes in the input buckets of the start action. It does this until someone calls the "finish" command for this job run (see below). Then no new workflow runs are allowed anymore, only the current active workflow runs will be able to complete. We call this the "standard" mode of a job run.

Starting a job run in a non standard mode: RUNONCE

If you want to start a job in a different mode than "standard", you must state this in a JSON body of the POST request above:

POST /ias/jobmanager/jobs/<job-name> {

 "mode": "runOnce"

}

This mode is currently supported:

  • runOnce: Allowed only for jobs with a start worker with a start action with exactly one input bucket. The job manager creates tasks to process the complete content of the input bucket and then immediately sets the new job run to state FINISHING, so it does not react to further changes in the input bucket and goes to SUCCESSFUL after all the tasks created initially have been processed successfully. If something goes wrong while creating the tasks, the job run goes to state FAILED immediately and no task should be processed. All tasks are executed in a single workflow run. The details of the task creation depend on the start action worker, because the task creation is actually done by the worker's task generator. Usually it will create one task for each object in the input bucket. For example, if you have defined an "indexBuild" workflow that starts with a tmeRecordAnalyzer worker listening to a persistent recordBulk bucket, you could use this command to re-create the complete index from the bulks in the bucket.

Back to the top