Class MultiInstanceSettings
- java.lang.Object
-
- com.microsoft.azure.batch.protocol.models.MultiInstanceSettings
-
public class MultiInstanceSettings extends Object
Settings which specify how to run a multi-instance Task. 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
Constructors Constructor Description MultiInstanceSettings()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ResourceFile>
commonResourceFiles()
Get 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.String
coordinationCommandLine()
Get a typical coordination command line launches a background service and verifies that the service is ready to process inter-node messages.Integer
numberOfInstances()
Get if omitted, the default is 1.MultiInstanceSettings
withCommonResourceFiles(List<ResourceFile> commonResourceFiles)
Set 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.MultiInstanceSettings
withCoordinationCommandLine(String coordinationCommandLine)
Set a typical coordination command line launches a background service and verifies that the service is ready to process inter-node messages.MultiInstanceSettings
withNumberOfInstances(Integer numberOfInstances)
Set if omitted, the default is 1.
-
-
-
Method Detail
-
numberOfInstances
public Integer numberOfInstances()
Get if omitted, the default is 1.- Returns:
- the numberOfInstances value
-
withNumberOfInstances
public MultiInstanceSettings withNumberOfInstances(Integer numberOfInstances)
Set if omitted, the default is 1.- Parameters:
numberOfInstances
- the numberOfInstances value to set- Returns:
- the MultiInstanceSettings object itself.
-
coordinationCommandLine
public String coordinationCommandLine()
Get a typical coordination command line launches a background service and verifies that the service is ready to process inter-node messages.- Returns:
- the coordinationCommandLine value
-
withCoordinationCommandLine
public MultiInstanceSettings withCoordinationCommandLine(String coordinationCommandLine)
Set a typical coordination command line launches a background service and verifies that the service is ready to process inter-node messages.- Parameters:
coordinationCommandLine
- the coordinationCommandLine value to set- Returns:
- the MultiInstanceSettings object itself.
-
commonResourceFiles
public List<ResourceFile> commonResourceFiles()
Get 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:
- the commonResourceFiles value
-
withCommonResourceFiles
public MultiInstanceSettings withCommonResourceFiles(List<ResourceFile> commonResourceFiles)
Set 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:
commonResourceFiles
- the commonResourceFiles value to set- Returns:
- the MultiInstanceSettings object itself.
-
-