Linking all generated doc pages to index. (refs #1608)
[arvados.git] / doc / api / JobTasks.textile
1 ---
2 layout: default
3 navsection: api
4 title: "Resource: JobTasks"
5 navorder: 16
6 ---
7
8 h1. JobTasks
9
10 A Job Task is a well defined independently-computable portion of a "Job":Jobs.html.
11
12 Job tasks are created two ways:
13 * When a job starts, it is seeded with a job task with @sequence=0@ and an empty @parameters{}@ list.
14 * Job task A can create additional job tasks B, C, D, which will belong to the same job. Tasks B, C, D will not be performed until job task A is complete. If job task A fails, tasks B, C, D will be deleted.
15
16 Job tasks have particular update semantics:
17 * Progress reporting: A job task should only be <code>PATCH</code>ed by a worker process which has been dispatched to work on that task and is reporting progress or completion status &mdash; and by the job manager itself.
18 * Completion: When a job task process terminates, the task is considered complete only if its most recent @PATCH@ transaction had @progress=1.0@ and @success=true@.
19 * Temporary failure: If a job task process terminates without updating @success@ to @true@ or @false@, it is assumed that the task failed but is worth re-attempting (at a different time, on a different node, etc).
20
21
22 h2. Methods
23
24 See "REST methods for working with Arvados resources":methods.html
25
26 API endpoint base: @https://{{ site.arvados_api_host }}/arvados/v1/job_tasks@
27
28 h2. Resource
29
30 Each job has, in addition to the usual "attributes of Arvados resources":resources.html:
31
32 table(table table-bordered table-condensed).
33 |*Attribute*|*Type*|*Description*|
34 |sequence|integer|Execution sequence.
35 A step cannot be run until all steps with lower sequence numbers have completed.
36 Job steps with the same sequence number can be run in any order.|
37 |parameters{}|list||
38 |runtime_constraints{}|list|Constraints that must be satisfied by the job/task scheduler in order to run the task (see "Jobs":Jobs.html).|
39 |output|string||
40 |progress|float||
41 |success|boolean|Is null if the task has neither completed successfully nor failed permanently.|
42
43 The following attributes should not be updated by anyone other than the job manager:
44
45 table(table table-bordered table-condensed).
46 |*Attribute*|*Type*|*Description*|*Notes*|
47 |qsequence|integer|Order of arrival|0-based|
48 |failed_count|number|Times this step has failed||
49 |failed_at|number|Time of last failure|Is null if failed_count=0|
50 |failed_log|string|stderr from last failure|Is null if failed_count=0|
51 |log|string|stderr||
52
53
54 h3. Resource limits
55
56 table(table table-bordered table-condensed).
57 |*Key*|*Type*|*Description*|*Implemented*|
58 |min_nodes|integer|||
59 |max_nodes|integer|||
60 |max_tasks_per_node|integer|Maximum simultaneous tasks on a single node|&#x2713;|
61 |min_ram_per_task|integer|Minimum real memory (KiB) per task||
62 |min_ram_per_node|integer|Minimum real memory (KiB) per node||