Use "filters" instead of "where" in examples and docs. Remove
[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. Queue
23
24 <pre>
25 GET https://{{ site.arvados_api_host }}/arvados/v1/jobs/queue
26
27 POST https://{{ site.arvados_api_host }}/arvados/v1/jobs/queue
28 _method=GET
29 filters=[["owner_uuid","=","xyzzy-tpzed-a4lcehql0dv2u25"]]
30 </pre>
31
32 &rarr; Job resource list
33
34 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.
35
36 h2. Resource
37
38 Each job has, in addition to the usual "attributes of Arvados resources":{{site.baseurl}}/api/resources.html:
39
40 table(table table-bordered table-condensed).
41 |_. Attribute|_. Type|_. Description|_. Notes|
42 |script|string|The filename of the job script.|This program will be invoked by Crunch for each job task. It is given as a path to an executable file, relative to the @/crunch_scripts@ directory in the Git tree specified by the _repository_ and _script_version_ attributes.|
43 |script_parameters|hash|The input parameters for the job.|Conventionally, one of the parameters is called @"input"@. Typically, some parameter values are collection UUIDs. Ultimately, though, the significance of parameters is left entirely up to the script itself.|
44 |repository|string|Git repository|Given as the name of a locally hosted git repository.|
45 |script_version|string|Git branch, tag, or commit hash.|Before the job starts, this is the Git branch, tag, or hash supplied by the user.  When the job starts, Arvados updates this field to the full 40-character git hash of the actual commit used by the job.|
46 |cancelled_by_client_uuid|string|API client ID|Is null if job has not been cancelled|
47 |cancelled_by_user_uuid|string|Authenticated user ID|Is null if job has not been cancelled|
48 |cancelled_at|datetime|When job was cancelled|Is null if job has not been cancelled|
49 |started_at|datetime|When job started running|Is null if job has not [yet] started|
50 |finished_at|datetime|When job finished running|Is null if job has not [yet] finished|
51 |running|boolean|Whether the job is running||
52 |success|boolean|Whether the job indicated successful completion|Is null if job has not finished|
53 |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.|
54 |log|string|Collection UUID|Is null if the job has not finished. After the job runs, the given collection contains a text file with log messages provided by the @arv-crunch-job@ task scheduler as well as the standard error streams provided by the task processes.|
55 |tasks_summary|Hash|Summary of task completion states.|Example: @{"done":0,"running":4,"todo":2,"failed":0}@|
56 |output|string|Collection UUID|Is null if the job has not finished.|
57 |nondeterministic|boolean|The job is expected to produce different results if run more than once.|If true, this job will not be considered as a candidate for automatic re-use when submitting subsequent identical jobs.|
58 |submit_id|string|Unique ID provided by client when job was submitted|Optional. This can be used by a client to make the "jobs.create":{{site.baseurl}}/api/methods/jobs.html#create method idempotent.|
59 |priority|string|||
60 |runtime_constraints|hash|Constraints that must be satisfied by the job/task scheduler in order to run the job.|See below.|
61
62 h3. Runtime constraints
63
64 table(table table-bordered table-condensed).
65 |_. Key|_. Type|_. Description|_. Implemented|
66 |min_nodes|integer||&#10003;|
67 |max_nodes|integer|||
68 |max_tasks_per_node|integer|Maximum simultaneous tasks on a single node|&#10003;|
69 |min_ram_per_task|integer|Minimum real memory (KiB) per task||
70 |min_ram_per_node|integer|Minimum real memory (KiB) per node||