Merge branch 'master' into 1971-show-image-thumbnails
[arvados.git] / doc / api / schema / Job.html.textile.liquid
1 ---
2 layout: default
3 navsection: api
4 navmenu: Schema
5 title: Job
6
7 ...
8
9
10
11 Applications submit compute jobs when:
12 * Provenance is important, i.e., it is worth recording how the output was produced; or
13 * Computation time is significant; or
14 * The job management features are convenient (failure detection/recovery, regression testing, etc).
15
16 h2. Methods
17
18 See "REST methods for working with Arvados resources":{{site.baseurl}}/api/methods.html
19
20 API endpoint base: @https://{{ site.arvados_api_host }}/arvados/v1/jobs@
21
22 h3. Additional parameters for "Create" method
23
24 table(table table-bordered table-condensed).
25 |_. Attribute               |_. Type|_. Accepted values                            |_. Required|_. Description|
26 |script                 |string     |filename                                      |yes        |The actual script that will be run by crunch.  Must be the name of an executable file in the crunch_scripts/ directory at the git revision specified by script_version.|
27 |script_version         |string     |git branch, tag, or version hash              |yes        |The code version to run, which is available in the specified repository.  May be a git hash or tag to specify an exact version, or a branch.  If it is a branch, use the branch head.|
28 |repository             |string     |name of git repository hosted by Arvados      |yes        |The repository to search for script_version.|
29 |script_parameters      |object     |any JSON object                               |yes        |The input parameters for the job, with the parameter names as keys mapping to parameter values.|
30 |minimum_script_version |string     |git branch, tag, or version hash              |no         |The minimum acceptable script version when deciding whether to re-use a past job.|
31 |exclude_script_versions|array of strings|git branch, tag, or version hash|no         |Script versions to exclude when deciding whether to re-use a past job.|
32 |nondeterministic       |boolean    |                                              |no         |If true, never re-use a past job, and flag this job so it will never be considered for re-use.|
33 |no_reuse               |boolean    |                                              |no         |If true, do not re-use a past job, but this job may be re-used.|
34
35 See the "job and pipeline reference":{{site.baseurl}}/user/reference/job-and-pipeline-reference.html for more information.
36
37 h3. Queue
38
39 <pre>
40 GET https://{{ site.arvados_api_host }}/arvados/v1/jobs/queue
41
42 POST https://{{ site.arvados_api_host }}/arvados/v1/jobs/queue
43 _method=GET
44 where[owner_uuid]=xyzzy-tpzed-a4lcehql0dv2u25
45 </pre>
46
47 &rarr; Job resource list
48
49 This method is equivalent to the "index method":{{site.baseurl}}/api/methods.html#index, except that the results are restricted to queued jobs (i.e., jobs that have not yet been started or cancelled) and order defaults to queue priority.
50
51 h2. Resource
52
53 Each job has, in addition to the usual "attributes of Arvados resources":{{site.baseurl}}/api/resources.html:
54
55 table(table table-bordered table-condensed).
56 |_. Attribute|_. Type|_. Description|_. Notes|
57 |submit_id|string|Unique ID provided by client when job was submitted|Optional. Can be used by client to ensure idempotence|
58 |priority|string|||
59 |runtime_constraints{}|list|Constraints that must be satisfied by the job/task scheduler in order to run the job.|See below.|
60 |script|string|Name of crunch script in @/crunch_scripts/@||
61 |script_parameters{}|list|Parameters passed to MapReduce script||
62 |script_version|string|The git ref of the the git commit used to run the job.|  When the job starts, Arvados updates this field to the precise git commit hash used by the job.|
63 |repository             |string     |The repository from which the script_version will be fetched.|
64 |cancelled_by_client_uuid|string|API client ID|Is null if job has not been cancelled|
65 |cancelled_by_user_uuid|string|Authenticated user ID|Is null if job has not been cancelled|
66 |cancelled_at|datetime|When job was cancelled|Is null if job has not been cancelled|
67 |started_at|datetime|When job started running|Is null if job has not [yet] started|
68 |finished_at|datetime|When job finished running|Is null if job has not [yet] finished|
69 |running|boolean|Whether the job is running||
70 |success|boolean|Whether the job indicated successful completion|Is null if job has not finished|
71 |is_locked_by_uuid|string|UUID of the user who has locked this job|Is null if job is not locked. The system user locks the job when starting the job, in order to prevent job attributes from being altered.|
72 |log|string|||
73 |tasks_summary|Hash|||
74 |output|string|||
75 |nondeterministic       |boolean    |Indicates whether this job is a candidate for re-use|If true, this job will never be considered for re-use.|
76
77 h3. Runtime constraints
78
79 table(table table-bordered table-condensed).
80 |_. Key|_. Type|_. Description|_. Implemented|
81 |dependencies{}|list|[
82  {
83   "name": "freebayes",
84   "package_type": "git",
85   "origin": "https://github.com/ekg/freebayes.git",
86   "version": "011561f4a96619125d4388b66b2e82b173f3de7a"
87  },
88  ...
89 ]||
90 |min_nodes|integer||&#10003;|
91 |max_nodes|integer|||
92 |max_tasks_per_node|integer|Maximum simultaneous tasks on a single node|&#10003;|
93 |min_ram_per_task|integer|Minimum real memory (KiB) per task||
94 |min_ram_per_node|integer|Minimum real memory (KiB) per node||