Skip to content

Commit c02f91d

Browse files
committed
correx
1 parent c10f9bc commit c02f91d

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

articles/batch/batch-job-prep-release.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Job preparation and release tasks on Batch compute nodes
33
description: Use job-level preparation tasks to minimize data transfer to Azure Batch compute nodes, and release tasks for node cleanup at job completion.
44
ms.topic: how-to
5-
ms.date: 04/06/2023
5+
ms.date: 04/11/2023
66
ms.devlang: csharp
77
ms.custom: "seodec18, devx-track-csharp"
88

@@ -12,7 +12,7 @@ ms.custom: "seodec18, devx-track-csharp"
1212
An Azure Batch job often requires setup before its tasks are executed, and post-job maintenance when its tasks are completed. For example, you might need to download common task input data to your compute nodes, or upload task output data to Azure Storage after the job completes. You can use *job preparation* and *job release* tasks for these operations.
1313

1414
- A job preparation task runs before a job's tasks, on all compute nodes scheduled to run at least one task.
15-
- A job release task runs once the job is completed, on each node in the pool that executed at least one task.
15+
- A job release task runs once the job is completed, on each node in the pool that ran a job preparation task.
1616

1717
As with other Batch tasks, you can specify a command line to invoke when a job preparation or release task runs. Job preparation and release tasks offer familiar Batch task features such as:
1818

@@ -53,7 +53,7 @@ The job preparation task runs only on nodes that are scheduled to run a task. Th
5353
5454
## Job release task
5555

56-
Once you mark a job as completed, the job release task runs on each node in the pool that ran at least one task. You mark a job as completed by issuing a terminate request. This request sets the job state to *terminating*, terminates any active or running tasks associated with the job, and runs the job release task. The job then moves to the *completed* state.
56+
Once you mark a job as completed, the job release task runs on each node in the pool that ran a job preparation task. You mark a job as completed by issuing a terminate request. This request sets the job state to *terminating*, terminates any active or running tasks associated with the job, and runs the job release task. The job then moves to the *completed* state.
5757

5858
> [!NOTE]
5959
> Deleting a job also executes the job release task. However, if a job is already terminated, the release task doesn't run a second time if the job is later deleted.

articles/batch/batch-job-task-error-checking.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ ms.date: 04/11/2023
77

88
# Azure Batch job and task errors
99

10-
Various errors can happen when you add Azure Batch jobs and tasks or when you schedule and run jobs and tasks. It's usually straightforward to detect errors that occur when you add jobs and tasks, because the API, command line, or user interface returns any failures immediately. This article covers how to check for and handle errors that occur after jobs and tasks are submitted.
10+
Various errors can happen when you add Azure Batch jobs and tasks or when you schedule and run jobs and tasks. It's usually straightforward to detect errors that occur when you add jobs and tasks. The API, command line, or user interface returns any failures immediately. This article covers how to check for and handle errors that occur after jobs and tasks are submitted.
1111

1212
## Job failures
1313

1414
A job is a group of one or more tasks, which specify command lines to run. You can specify the following optional parameters when you add a job. These parameters influence how the job can fail.
1515

16-
- [JobConstraints](/rest/api/batchservice/job/add#jobconstraints). You can optionally use the `maxWallClockTime` property to set the maximum amount of time a job can be active or running. If the job exceeds the `maxWallClockTime`, the job terminates with the `terminateReason` property set in the [JobExecutionInformation](/rest/api/batchservice/job/get#jobexecutioninformation).
16+
- [JobConstraints](/rest/api/batchservice/job/add#jobconstraints). You can optionally use the `maxWallClockTime` property to set the maximum amount of time a job can be active or running. If the job exceeds the `maxWallClockTime`, the job terminates with the `terminateReason` property set to `MaxWallClockTimeExpiry` in the [JobExecutionInformation](/rest/api/batchservice/job/get#jobexecutioninformation).
1717

18-
- [JobPreparationTask](/rest/api/batchservice/job/add#jobpreparationtask). You can optionally specify a job preparation task to run on a node the first time it runs a task for the job. If the job preparation task fails, the task doesn't run and the job doesn't complete.
18+
- [JobPreparationTask](/rest/api/batchservice/job/add#jobpreparationtask). You can optionally specify a job preparation task to run on each compute node scheduled to run a job task. The node runs the job preparation task before the first time it runs a task for the job. If the job preparation task fails, the task doesn't run and the job doesn't complete.
1919

2020
- [JobReleaseTask](/rest/api/batchservice/job/add#jobreleasetask). You can optionally specify a job release task for jobs that have a job preparation task. When a job is being terminated, the job release task runs on each pool node that ran a job preparation task. If a job release task fails, the job still moves to a `completed` state.
2121

@@ -31,7 +31,7 @@ Check the following job properties in the [JobExecutionInformation](/rest/api/ba
3131

3232
### Job preparation tasks
3333

34-
An instance of a [job preparation task](batch-job-prep-release.md#job-preparation-task) runs on a node the first time the node runs a task for the job. You can think of the job preparation task as a task template, with multiple instances being run, up to the number of nodes in a pool. Check the job preparation task instances to determine if there were errors.
34+
An instance of a [job preparation task](batch-job-prep-release.md#job-preparation-task) runs on each compute node the first time the node runs a task for the job. You can think of the job preparation task as a task template, with multiple instances being run, up to the number of nodes in a pool. Check the job preparation task instances to determine if there were errors.
3535

3636
You can use the [Job - List Preparation and Release Task Status](/rest/api/batchservice/job/listpreparationandreleasetaskstatus) API to list the execution status of all instances of job preparation and release tasks for a specified job. As with other tasks, [JobPreparationTaskExecutionInformation](/rest/api/batchservice/job/listpreparationandreleasetaskstatus#jobpreparationtaskexecutioninformation) is available with properties such as `failureInfo`, `exitCode`, and `result`.
3737

@@ -71,21 +71,21 @@ Consider the impact of task failures on the job and on any task dependencies. Yo
7171

7272
Task command lines don't run under a shell on compute nodes, so they can't natively use shell features such as environment variable expansion. To take advantage of such features, you must invoke the shell in the command line. For more information, see [Command-line expansion of environment variables](batch-compute-node-environment-variables.md#command-line-expansion-of-environment-variables).
7373

74-
Task command line output writes to *stderr.txt* and *stdout.txt*. Your application might also write to application-specific log files. Make sure to implement comprehensive error checking for your application to promptly detect and diagnose issues.
74+
Task command line output writes to *stderr.txt* and *stdout.txt* files. Your application might also write to application-specific log files. Make sure to implement comprehensive error checking for your application to promptly detect and diagnose issues.
7575

7676
If the pool node that ran a task still exists, you can get and view the log files. Several APIs allow listing and getting task files, such as [File - Get From Task](/rest/api/batchservice/file/getfromtask). You can also list and view log files for a task or pool node by using the Azure portal.
7777

7878
1. At the top of the **Overview** page for a node, select **Upload batch logs**.
7979

80-
![Screenshot of a node overview page with Upload batch logs highlighted.](media/node-page.png)
80+
![Screenshot of a node overview page with Upload batch logs highlighted.](media/batch-job-task-error-checking/node-page.png)
8181

8282
1. On the **Upload Batch logs** page, select **Pick storage container**, select an Azure Storage container to upload to, and then select **Start upload**.
8383

84-
![Screenshot of the Upload batch logs page.](media/upload-batch-logs.png)
84+
![Screenshot of the Upload batch logs page.](media/batch-job-task-error-checking/upload-batch-logs.png)
8585

8686
1. On the storage container page, you can view, open, or download the logs.
8787

88-
![Screenshot of task logs in a storage container.](media/task-logs.png)
88+
![Screenshot of task logs in a storage container.](media/batch-job-task-error-checking/task-logs.png)
8989

9090
Because Batch pools and pool nodes are often ephemeral, with nodes being continuously added and deleted, it's best to save the log files from job runs. You can use task output files for a convenient way to save log files to Azure Storage. For more information, see [Persist task data to Azure Storage with the Batch service API](batch-task-output-files.md).
9191

0 commit comments

Comments
 (0)