-
Notifications
You must be signed in to change notification settings - Fork 4.6k
/
MultiInstanceSettings.cs
106 lines (98 loc) · 4.44 KB
/
MultiInstanceSettings.cs
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
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace Microsoft.Azure.Batch.Protocol.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// Settings which specify how to run a multi-instance Task.
/// </summary>
/// <remarks>
/// Multi-instance Tasks are commonly used to support MPI Tasks. In the MPI
/// case, if any of the subtasks fail (for example due to exiting with a
/// non-zero exit code) the entire multi-instance Task fails. The
/// multi-instance Task is then terminated and retried, up to its retry
/// limit.
/// </remarks>
public partial class MultiInstanceSettings
{
/// <summary>
/// Initializes a new instance of the MultiInstanceSettings class.
/// </summary>
public MultiInstanceSettings()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the MultiInstanceSettings class.
/// </summary>
/// <param name="coordinationCommandLine">The command line to run on
/// all the Compute Nodes to enable them to coordinate when the primary
/// runs the main Task command.</param>
/// <param name="numberOfInstances">The number of Compute Nodes
/// required by the Task.</param>
/// <param name="commonResourceFiles">A list of files that the Batch
/// service will download before running the coordination command
/// line.</param>
public MultiInstanceSettings(string coordinationCommandLine, int? numberOfInstances = default(int?), IList<ResourceFile> commonResourceFiles = default(IList<ResourceFile>))
{
NumberOfInstances = numberOfInstances;
CoordinationCommandLine = coordinationCommandLine;
CommonResourceFiles = commonResourceFiles;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets the number of Compute Nodes required by the Task.
/// </summary>
/// <remarks>
/// If omitted, the default is 1.
/// </remarks>
[JsonProperty(PropertyName = "numberOfInstances")]
public int? NumberOfInstances { get; set; }
/// <summary>
/// Gets or sets the command line to run on all the Compute Nodes to
/// enable them to coordinate when the primary runs the main Task
/// command.
/// </summary>
/// <remarks>
/// A typical coordination command line launches a background service
/// and verifies that the service is ready to process inter-node
/// messages.
/// </remarks>
[JsonProperty(PropertyName = "coordinationCommandLine")]
public string CoordinationCommandLine { get; set; }
/// <summary>
/// Gets or sets a list of files that the Batch service will download
/// before running the coordination command line.
/// </summary>
/// <remarks>
/// The difference between common resource files and Task resource
/// files is that common resource files are downloaded for all subtasks
/// including the primary, whereas Task resource files are downloaded
/// only for the primary. Also note that these resource files are not
/// downloaded to the Task working directory, but instead are
/// downloaded to the Task root directory (one directory above the
/// 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.
/// </remarks>
[JsonProperty(PropertyName = "commonResourceFiles")]
public IList<ResourceFile> CommonResourceFiles { get; set; }
}
}