MultiInstanceSettings Class
- java.
lang. Object - com.
azure. compute. batch. models. MultiInstanceSettings
- com.
Implements
public final class MultiInstanceSettings
implements JsonSerializable<MultiInstanceSettings>
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.
Constructor Summary
| Constructor | Description |
|---|---|
| MultiInstanceSettings(String coordinationCommandLine) |
Creates an instance of Multi |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Multi |
fromJson(JsonReader jsonReader)
Reads an instance of Multi |
|
List<Resource |
getCommonResourceFiles()
Get the common |
| String |
getCoordinationCommandLine()
Get the coordination |
| Integer |
getNumberOfInstances()
Get the number |
|
Multi |
setCommonResourceFiles(List<ResourceFile> commonResourceFiles)
Set the common |
|
Multi |
setNumberOfInstances(Integer numberOfInstances)
Set the number |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Constructor Details
MultiInstanceSettings
public MultiInstanceSettings(String coordinationCommandLine)
Creates an instance of MultiInstanceSettings class.
Parameters:
Method Details
fromJson
public static MultiInstanceSettings fromJson(JsonReader jsonReader)
Reads an instance of MultiInstanceSettings from the JsonReader.
Parameters:
Returns:
Throws:
getCommonResourceFiles
public List<ResourceFile> getCommonResourceFiles()
Get the commonResourceFiles property: A list of files that the Batch service will download before running the coordination command line. 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.
Returns:
getCoordinationCommandLine
public String getCoordinationCommandLine()
Get the coordinationCommandLine property: The command line to run on all the Compute Nodes to enable them to coordinate when the primary runs the main Task command. A typical coordination command line launches a background service and verifies that the service is ready to process inter-node messages.
Returns:
getNumberOfInstances
public Integer getNumberOfInstances()
Get the numberOfInstances property: The number of Compute Nodes required by the Task. If omitted, the default is 1.
Returns:
setCommonResourceFiles
public MultiInstanceSettings setCommonResourceFiles(List<ResourceFile> commonResourceFiles)
Set the commonResourceFiles property: A list of files that the Batch service will download before running the coordination command line. 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.
Parameters:
Returns:
setNumberOfInstances
public MultiInstanceSettings setNumberOfInstances(Integer numberOfInstances)
Set the numberOfInstances property: The number of Compute Nodes required by the Task. If omitted, the default is 1.
Parameters:
Returns: