-
Notifications
You must be signed in to change notification settings - Fork 250
/
Copy pathazure.batch.models.BatchJobManagerTask.yml
550 lines (413 loc) · 19.4 KB
/
azure.batch.models.BatchJobManagerTask.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
### YamlMime:PythonClass
uid: azure.batch.models.BatchJobManagerTask
name: BatchJobManagerTask
fullName: azure.batch.models.BatchJobManagerTask
module: azure.batch.models
summary: 'Specifies details of a Job Manager Task.
The Job Manager Task is automatically started when the Job is created. The
Batch service tries to schedule the Job Manager Task before any other Tasks in
the Job. When shrinking a Pool, the Batch service tries to preserve Nodes where
Job Manager Tasks are running for as long as possible (that is, Compute Nodes
running ''normal'' Tasks are removed before Compute Nodes running Job Manager
Tasks). When a Job Manager Task fails and needs to be restarted, the system
tries to schedule it at the highest priority. If there are no idle Compute
Nodes available, the system may terminate one of the running Tasks in the Pool
and return it to the queue in order to make room for the Job Manager Task to
restart. Note that a Job Manager Task in one Job does not have priority over
Tasks in other Jobs. Across Jobs, only Job level priorities are observed. For
example, if a Job Manager in a priority 0 Job needs to be restarted, it will
not displace Tasks of a priority 1 Job. Batch will retry Tasks when a recovery
operation is triggered on a Node. Examples of recovery operations include (but
are not limited to) when an unhealthy Node is rebooted or a Compute Node
disappeared due to host failure. Retries due to recovery operations are
independent of and are not counted against the maxTaskRetryCount. Even if the
maxTaskRetryCount is 0, an internal retry due to a recovery operation may
occur. Because of this, all Tasks should be idempotent. This means Tasks need
to tolerate being interrupted and restarted without causing any corruption or
duplicate data. The best practice for long running Tasks is to use some form of
checkpointing.
All required parameters must be populated in order to send to server.'
constructor:
syntax: 'BatchJobManagerTask(*args: Any, **kwargs: Any)'
variables:
- description: 'A string that uniquely identifies the Job Manager Task within the
Job. The ID can
contain any combination of alphanumeric characters including hyphens and underscores
and cannot
contain more than 64 characters. Required.'
name: id
types:
- <xref:str>
- description: 'The display name of the Job Manager Task. It need not be unique and
can
contain any Unicode characters up to a maximum length of 1024.'
name: display_name
types:
- <xref:str>
- description: 'The command line of the Job Manager Task. The command line does not
run
under a shell, and therefore cannot take advantage of shell features such as environment
variable expansion. If you want to take advantage of such features, you should
invoke the shell
in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh
-c MyCommand"
in Linux. If the command line refers to file paths, it should use a relative path
(relative to
the Task working directory), or use the Batch provided environment variable
([https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables](https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables)).
Required.'
name: command_line
types:
- <xref:str>
- description: 'The settings for the container under which the Job Manager Task runs.
If the Pool that will run this Task has containerConfiguration set, this must
be set as well.
If the Pool that will run this Task doesn''t have containerConfiguration set,
this must not be
set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR
(the
root of Azure Batch directories on the node) are mapped into the container, all
Task
environment variables are mapped into the container, and the Task command line
is executed in
the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR
might not be
reflected to the host disk, meaning that Batch file APIs will not be able to access
those
files.'
name: container_settings
types:
- <xref:azure.batch.models.BatchTaskContainerSettings>
- description: 'A list of files that the Batch service will download to the Compute
Node
before running the command line. Files listed under this element are located in
the Task''s
working directory. There is a maximum size for the list of resource files. When
the max size
is exceeded, the request will fail and the response error code will be RequestEntityTooLarge.
If this occurs, the collection of ResourceFiles must be reduced in size. This
can be achieved
using .zip files, Application Packages, or Docker Containers.'
name: resource_files
types:
- <xref:list>[<xref:azure.batch.models.ResourceFile>]
- description: 'A list of files that the Batch service will upload from the Compute
Node
after running the command line. For multi-instance Tasks, the files will only
be uploaded from
the Compute Node on which the primary Task is executed.'
name: output_files
types:
- <xref:list>[<xref:azure.batch.models.OutputFile>]
- description: A list of environment variable settings for the Job Manager Task.
name: environment_settings
types:
- <xref:list>[<xref:azure.batch.models.EnvironmentSetting>]
- description: Constraints that apply to the Job Manager Task.
name: constraints
types:
- <xref:azure.batch.models.BatchTaskConstraints>
- description: 'The number of scheduling slots that the Task requires to run. The
default
is 1. A Task can only be scheduled to run on a compute node if the node has enough
free
scheduling slots available. For multi-instance Tasks, this property is not supported
and must
not be specified.'
name: required_slots
types:
- <xref:int>
- description: 'Whether completion of the Job Manager Task signifies completion
of the entire Job. If true, when the Job Manager Task completes, the Batch service
marks the
Job as complete. If any Tasks are still running at this time (other than Job Release),
those
Tasks are terminated. If false, the completion of the Job Manager Task does not
affect the Job
status. In this case, you should either use the onAllTasksComplete attribute to
terminate the
Job, or have a client or user terminate the Job explicitly. An example of this
is if the Job
Manager creates a set of Tasks but then takes no further role in their execution.
The default
value is true. If you are using the onAllTasksComplete and onTaskFailure attributes
to control
Job lifetime, and using the Job Manager Task only to create the Tasks for the
Job (not to
monitor progress), then it is important to set killJobOnCompletion to false.'
name: kill_job_on_completion
types:
- <xref:bool>
- description: 'The user identity under which the Job Manager Task runs. If omitted,
the
Task runs as a non-administrative user unique to the Task.'
name: user_identity
types:
- <xref:azure.batch.models.UserIdentity>
- description: 'Whether the Job Manager Task requires exclusive use of the Compute
Node
where it runs. If true, no other Tasks will run on the same Node for as long as
the Job Manager
is running. If false, other Tasks can run simultaneously with the Job Manager
on a Compute
Node. The Job Manager Task counts normally against the Compute Node''s concurrent
Task limit, so
this is only relevant if the Compute Node allows multiple concurrent Tasks. The
default value
is true.'
name: run_exclusive
types:
- <xref:bool>
- description: 'A list of Application Packages that the Batch service
will deploy to the
Compute Node before running the command line.Application Packages are
downloaded and deployed to a shared directory, not the Task working
directory. Therefore, if a referenced Application Package is already
on the Compute Node, and is up to date, then it is not re-downloaded;
the existing copy on the Compute Node is used. If a referenced Application
Package cannot be installed, for example because the package has been deleted
or because download failed, the Task fails.'
name: application_package_references
types:
- <xref:list>[<xref:azure.batch.models.BatchApplicationPackageReference>]
- description: 'The settings for an authentication token that the Task can
use to perform Batch service operations. If this property is set, the Batch service
provides
the Task with an authentication token which can be used to authenticate Batch
service
operations without requiring an Account access key. The token is provided via
the
AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task
can carry out
using the token depend on the settings. For example, a Task can request Job permissions
in
order to add other Tasks to the Job, or check the status of the Job or of other
Tasks under the
Job.'
name: authentication_token_settings
types:
- <xref:azure.batch.models.AuthenticationTokenSettings>
- description: 'Whether the Job Manager Task may run on a Spot/Low-priority
Compute Node. The default value is true.'
name: allow_low_priority_node
types:
- <xref:bool>
methods:
- uid: azure.batch.models.BatchJobManagerTask.as_dict
name: as_dict
summary: Return a dict that can be JSONify using json.dump.
signature: 'as_dict(*, exclude_readonly: bool = False) -> Dict[str, Any]'
keywordOnlyParameters:
- name: exclude_readonly
description: Whether to remove the readonly properties.
types:
- <xref:bool>
return:
description: A dict JSON compatible object
types:
- <xref:dict>
- uid: azure.batch.models.BatchJobManagerTask.clear
name: clear
signature: clear() -> None
- uid: azure.batch.models.BatchJobManagerTask.copy
name: copy
signature: copy() -> Model
- uid: azure.batch.models.BatchJobManagerTask.get
name: get
signature: 'get(key: str, default: Any = None) -> Any'
parameters:
- name: key
isRequired: true
- name: default
defaultValue: None
- uid: azure.batch.models.BatchJobManagerTask.items
name: items
signature: items() -> ItemsView[str, Any]
- uid: azure.batch.models.BatchJobManagerTask.keys
name: keys
signature: keys() -> KeysView[str]
- uid: azure.batch.models.BatchJobManagerTask.pop
name: pop
signature: 'pop(key: str, default: ~typing.Any = <object object>) -> Any'
parameters:
- name: key
isRequired: true
- name: default
- uid: azure.batch.models.BatchJobManagerTask.popitem
name: popitem
signature: popitem() -> Tuple[str, Any]
- uid: azure.batch.models.BatchJobManagerTask.setdefault
name: setdefault
signature: 'setdefault(key: str, default: ~typing.Any = <object object>) -> Any'
parameters:
- name: key
isRequired: true
- name: default
- uid: azure.batch.models.BatchJobManagerTask.update
name: update
signature: 'update(*args: Any, **kwargs: Any) -> None'
- uid: azure.batch.models.BatchJobManagerTask.values
name: values
signature: values() -> ValuesView[Any]
attributes:
- uid: azure.batch.models.BatchJobManagerTask.allow_low_priority_node
name: allow_low_priority_node
summary: 'Whether the Job Manager Task may run on a Spot/Low-priority Compute Node.
The default value is
true.'
signature: 'allow_low_priority_node: bool | None'
- uid: azure.batch.models.BatchJobManagerTask.application_package_references
name: application_package_references
summary: 'A list of Application Packages that the Batch service will deploy to the
Compute Node before running the command line.Application Packages are
downloaded and deployed to a shared directory, not the Task working
directory. Therefore, if a referenced Application Package is already
on the Compute Node, and is up to date, then it is not re-downloaded;
the existing copy on the Compute Node is used. If a referenced Application
Package cannot be installed, for example because the package has been deleted
or because download failed, the Task fails.'
signature: 'application_package_references: List[_models.BatchApplicationPackageReference]
| None'
- uid: azure.batch.models.BatchJobManagerTask.authentication_token_settings
name: authentication_token_settings
summary: 'The settings for an authentication token that the Task can use to perform
Batch service
operations. If this property is set, the Batch service provides the Task with
an authentication
token which can be used to authenticate Batch service operations without requiring
an Account
access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment
variable.
The operations that the Task can carry out using the token depend on the settings.
For example,
a Task can request Job permissions in order to add other Tasks to the Job, or
check the status
of the Job or of other Tasks under the Job.'
signature: 'authentication_token_settings: _models.AuthenticationTokenSettings |
None'
- uid: azure.batch.models.BatchJobManagerTask.command_line
name: command_line
summary: 'The command line of the Job Manager Task. The command line does not run
under a shell, and
therefore cannot take advantage of shell features such as environment variable
expansion. If
you want to take advantage of such features, you should invoke the shell in the
command line,
for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux.
If the
command line refers to file paths, it should use a relative path (relative to
the Task working
directory), or use the Batch provided environment variable
([https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables](https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables)).
Required.'
signature: 'command_line: str'
- uid: azure.batch.models.BatchJobManagerTask.constraints
name: constraints
summary: Constraints that apply to the Job Manager Task.
signature: 'constraints: _models.BatchTaskConstraints | None'
- uid: azure.batch.models.BatchJobManagerTask.container_settings
name: container_settings
summary: 'The settings for the container under which the Job Manager Task runs.
If the Pool that will run
this Task has containerConfiguration set, this must be set as well. If the Pool
that will run
this Task doesn''t have containerConfiguration set, this must not be set. When
this is
specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root
of Azure
Batch directories on the node) are mapped into the container, all Task environment
variables
are mapped into the container, and the Task command line is executed in the container.
Files
produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected
to the host
disk, meaning that Batch file APIs will not be able to access those files.'
signature: 'container_settings: _models.BatchTaskContainerSettings | None'
- uid: azure.batch.models.BatchJobManagerTask.display_name
name: display_name
summary: 'The display name of the Job Manager Task. It need not be unique and can
contain any Unicode
characters up to a maximum length of 1024.'
signature: 'display_name: str | None'
- uid: azure.batch.models.BatchJobManagerTask.environment_settings
name: environment_settings
summary: A list of environment variable settings for the Job Manager Task.
signature: 'environment_settings: List[_models.EnvironmentSetting] | None'
- uid: azure.batch.models.BatchJobManagerTask.id
name: id
summary: 'A string that uniquely identifies the Job Manager Task within the Job.
The ID can contain any
combination of alphanumeric characters including hyphens and underscores and cannot
contain
more than 64 characters. Required.'
signature: 'id: str'
- uid: azure.batch.models.BatchJobManagerTask.kill_job_on_completion
name: kill_job_on_completion
summary: 'Whether completion of the Job Manager Task signifies completion of the
entire Job. If true,
when the Job Manager Task completes, the Batch service marks the Job as complete.
If any Tasks
are still running at this time (other than Job Release), those Tasks are terminated.
If false,
the completion of the Job Manager Task does not affect the Job status. In this
case, you should
either use the onAllTasksComplete attribute to terminate the Job, or have a client
or user
terminate the Job explicitly. An example of this is if the Job Manager creates
a set of Tasks
but then takes no further role in their execution. The default value is true.
If you are using
the onAllTasksComplete and onTaskFailure attributes to control Job lifetime, and
using the Job
Manager Task only to create the Tasks for the Job (not to monitor progress), then
it is
important to set killJobOnCompletion to false.'
signature: 'kill_job_on_completion: bool | None'
- uid: azure.batch.models.BatchJobManagerTask.output_files
name: output_files
summary: 'A list of files that the Batch service will upload from the Compute Node
after running the
command line. For multi-instance Tasks, the files will only be uploaded from the
Compute Node
on which the primary Task is executed.'
signature: 'output_files: List[_models.OutputFile] | None'
- uid: azure.batch.models.BatchJobManagerTask.required_slots
name: required_slots
summary: 'The number of scheduling slots that the Task requires to run. The default
is 1. A Task can only
be scheduled to run on a compute node if the node has enough free scheduling slots
available.
For multi-instance Tasks, this property is not supported and must not be specified.'
signature: 'required_slots: int | None'
- uid: azure.batch.models.BatchJobManagerTask.resource_files
name: resource_files
summary: 'A list of files that the Batch service will download to the Compute Node
before running the
command line. Files listed under this element are located in the Task''s working
directory.
There is a maximum size for the list of resource files. When the max size is
exceeded, the
request will fail and the response error code will be RequestEntityTooLarge. If
this occurs,
the collection of ResourceFiles must be reduced in size. This can be achieved
using .zip files,
Application Packages, or Docker Containers.'
signature: 'resource_files: List[_models.ResourceFile] | None'
- uid: azure.batch.models.BatchJobManagerTask.run_exclusive
name: run_exclusive
summary: 'Whether the Job Manager Task requires exclusive use of the Compute Node
where it runs. If true,
no other Tasks will run on the same Node for as long as the Job Manager is running.
If false,
other Tasks can run simultaneously with the Job Manager on a Compute Node. The
Job Manager Task
counts normally against the Compute Node''s concurrent Task limit, so this is
only relevant if
the Compute Node allows multiple concurrent Tasks. The default value is true.'
signature: 'run_exclusive: bool | None'
- uid: azure.batch.models.BatchJobManagerTask.user_identity
name: user_identity
summary: 'The user identity under which the Job Manager Task runs. If omitted, the
Task runs as a
non-administrative user unique to the Task.'
signature: 'user_identity: _models.UserIdentity | None'