JobAddParameter Class

  • java.lang.Object
    • com.microsoft.azure.batch.protocol.models.JobAddParameter

public class JobAddParameter

An Azure Batch job to add.

Method Summary

Modifier and Type Method and Description
List<EnvironmentSetting> commonEnvironmentSettings()

Get individual tasks can override an environment setting specified here by specifying the same setting name with a different value.

JobConstraints constraints()

Get the execution constraints for the job.

String displayName()

Get the display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.

String id()

Get the ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an account that differ only by case).

JobManagerTask jobManagerTask()

Get if the job does not specify a Job Manager task, the user must explicitly add tasks to the job. If the job does specify a Job Manager task, the Batch service creates the Job Manager task when the job is created, and will try to schedule the Job Manager task before scheduling other tasks in the job. The Job Manager task's typical purpose is to control and/or monitor job execution, for example by deciding what additional tasks to run, determining when the work is complete, etc. (However, a Job Manager task is not restricted to these activities - it is a fully-fledged task in the system and perform whatever actions are required for the job.) For example, a Job Manager task might download a file specified as a parameter, analyze the contents of that file and submit additional tasks based on those contents.

JobPreparationTask jobPreparationTask()

Get if a job has a Job Preparation task, the Batch service will run the Job Preparation task on a compute node before starting any tasks of that job on that compute node.

JobReleaseTask jobReleaseTask()

Get a Job Release task cannot be specified without also specifying a Job Preparation task for the job. The Batch service runs the Job Release task on the compute nodes that have run the Job Preparation task. The primary purpose of the Job Release task is to undo changes to compute nodes made by the Job Preparation task. Example activities include deleting local files, or shutting down services that were started as part of job preparation.

List<MetadataItem> metadata()

Get the Batch service does not assign any meaning to metadata; it is solely for the use of user code.

JobNetworkConfiguration networkConfiguration()

Get the networkConfiguration value.

OnAllTasksComplete onAllTasksComplete()

Get note that if a job contains no tasks, then all tasks are considered complete. This option is therefore most commonly used with a Job Manager task; if you want to use automatic job termination without a Job Manager, you should initially set onAllTasksComplete to noaction and update the job properties to set onAllTasksComplete to terminatejob once you have finished adding tasks. The default is noaction. Possible values include: 'noAction', 'terminateJob'.

OnTaskFailure onTaskFailure()

Get a task is considered to have failed if has a failureInfo. A failureInfo is set if the task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the task, for example due to a resource file download error. The default is noaction. Possible values include: 'noAction', 'performExitOptionsJobAction'.

PoolInformation poolInfo()

Get the poolInfo value.

Integer priority()

Get priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0.

Boolean usesTaskDependencies()

Get the usesTaskDependencies value.

JobAddParameter withCommonEnvironmentSettings(List<EnvironmentSetting> commonEnvironmentSettings)

Set individual tasks can override an environment setting specified here by specifying the same setting name with a different value.

JobAddParameter withConstraints(JobConstraints constraints)

Set the execution constraints for the job.

JobAddParameter withDisplayName(String displayName)

Set the display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.

JobAddParameter withId(String id)

Set the ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an account that differ only by case).

JobAddParameter withJobManagerTask(JobManagerTask jobManagerTask)

Set if the job does not specify a Job Manager task, the user must explicitly add tasks to the job. If the job does specify a Job Manager task, the Batch service creates the Job Manager task when the job is created, and will try to schedule the Job Manager task before scheduling other tasks in the job. The Job Manager task's typical purpose is to control and/or monitor job execution, for example by deciding what additional tasks to run, determining when the work is complete, etc. (However, a Job Manager task is not restricted to these activities - it is a fully-fledged task in the system and perform whatever actions are required for the job.) For example, a Job Manager task might download a file specified as a parameter, analyze the contents of that file and submit additional tasks based on those contents.

JobAddParameter withJobPreparationTask(JobPreparationTask jobPreparationTask)

Set if a job has a Job Preparation task, the Batch service will run the Job Preparation task on a compute node before starting any tasks of that job on that compute node.

JobAddParameter withJobReleaseTask(JobReleaseTask jobReleaseTask)

Set a Job Release task cannot be specified without also specifying a Job Preparation task for the job. The Batch service runs the Job Release task on the compute nodes that have run the Job Preparation task. The primary purpose of the Job Release task is to undo changes to compute nodes made by the Job Preparation task. Example activities include deleting local files, or shutting down services that were started as part of job preparation.

JobAddParameter withMetadata(List<MetadataItem> metadata)

Set the Batch service does not assign any meaning to metadata; it is solely for the use of user code.

JobAddParameter withNetworkConfiguration(JobNetworkConfiguration networkConfiguration)

Set the networkConfiguration value.

JobAddParameter withOnAllTasksComplete(OnAllTasksComplete onAllTasksComplete)

Set note that if a job contains no tasks, then all tasks are considered complete. This option is therefore most commonly used with a Job Manager task; if you want to use automatic job termination without a Job Manager, you should initially set onAllTasksComplete to noaction and update the job properties to set onAllTasksComplete to terminatejob once you have finished adding tasks. The default is noaction. Possible values include: 'noAction', 'terminateJob'.

JobAddParameter withOnTaskFailure(OnTaskFailure onTaskFailure)

Set a task is considered to have failed if has a failureInfo. A failureInfo is set if the task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the task, for example due to a resource file download error. The default is noaction. Possible values include: 'noAction', 'performExitOptionsJobAction'.

JobAddParameter withPoolInfo(PoolInformation poolInfo)

Set the poolInfo value.

JobAddParameter withPriority(Integer priority)

Set priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0.

JobAddParameter withUsesTaskDependencies(Boolean usesTaskDependencies)

Set the usesTaskDependencies value.

Method Details

commonEnvironmentSettings

public List commonEnvironmentSettings()

Get individual tasks can override an environment setting specified here by specifying the same setting name with a different value.

Returns:

the commonEnvironmentSettings value

constraints

public JobConstraints constraints()

Get the execution constraints for the job.

Returns:

the constraints value

displayName

public String displayName()

Get the display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.

Returns:

the displayName value

id

public String id()

Get the ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an account that differ only by case).

Returns:

the id value

jobManagerTask

public JobManagerTask jobManagerTask()

Get if the job does not specify a Job Manager task, the user must explicitly add tasks to the job. If the job does specify a Job Manager task, the Batch service creates the Job Manager task when the job is created, and will try to schedule the Job Manager task before scheduling other tasks in the job. The Job Manager task's typical purpose is to control and/or monitor job execution, for example by deciding what additional tasks to run, determining when the work is complete, etc. (However, a Job Manager task is not restricted to these activities - it is a fully-fledged task in the system and perform whatever actions are required for the job.) For example, a Job Manager task might download a file specified as a parameter, analyze the contents of that file and submit additional tasks based on those contents.

Returns:

the jobManagerTask value

jobPreparationTask

public JobPreparationTask jobPreparationTask()

Get if a job has a Job Preparation task, the Batch service will run the Job Preparation task on a compute node before starting any tasks of that job on that compute node.

Returns:

the jobPreparationTask value

jobReleaseTask

public JobReleaseTask jobReleaseTask()

Get a Job Release task cannot be specified without also specifying a Job Preparation task for the job. The Batch service runs the Job Release task on the compute nodes that have run the Job Preparation task. The primary purpose of the Job Release task is to undo changes to compute nodes made by the Job Preparation task. Example activities include deleting local files, or shutting down services that were started as part of job preparation.

Returns:

the jobReleaseTask value

metadata

public List metadata()

Get the Batch service does not assign any meaning to metadata; it is solely for the use of user code.

Returns:

the metadata value

networkConfiguration

public JobNetworkConfiguration networkConfiguration()

Get the networkConfiguration value.

Returns:

the networkConfiguration value

onAllTasksComplete

public OnAllTasksComplete onAllTasksComplete()

Get note that if a job contains no tasks, then all tasks are considered complete. This option is therefore most commonly used with a Job Manager task; if you want to use automatic job termination without a Job Manager, you should initially set onAllTasksComplete to noaction and update the job properties to set onAllTasksComplete to terminatejob once you have finished adding tasks. The default is noaction. Possible values include: 'noAction', 'terminateJob'.

Returns:

the onAllTasksComplete value

onTaskFailure

public OnTaskFailure onTaskFailure()

Get a task is considered to have failed if has a failureInfo. A failureInfo is set if the task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the task, for example due to a resource file download error. The default is noaction. Possible values include: 'noAction', 'performExitOptionsJobAction'.

Returns:

the onTaskFailure value

poolInfo

public PoolInformation poolInfo()

Get the poolInfo value.

Returns:

the poolInfo value

priority

public Integer priority()

Get priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0.

Returns:

the priority value

usesTaskDependencies

public Boolean usesTaskDependencies()

Get the usesTaskDependencies value.

Returns:

the usesTaskDependencies value

withCommonEnvironmentSettings

public JobAddParameter withCommonEnvironmentSettings(List commonEnvironmentSettings)

Set individual tasks can override an environment setting specified here by specifying the same setting name with a different value.

Parameters:

commonEnvironmentSettings - the commonEnvironmentSettings value to set

Returns:

the JobAddParameter object itself.

withConstraints

public JobAddParameter withConstraints(JobConstraints constraints)

Set the execution constraints for the job.

Parameters:

constraints - the constraints value to set

Returns:

the JobAddParameter object itself.

withDisplayName

public JobAddParameter withDisplayName(String displayName)

Set the display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.

Parameters:

displayName - the displayName value to set

Returns:

the JobAddParameter object itself.

withId

public JobAddParameter withId(String id)

Set the ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an account that differ only by case).

Parameters:

id - the id value to set

Returns:

the JobAddParameter object itself.

withJobManagerTask

public JobAddParameter withJobManagerTask(JobManagerTask jobManagerTask)

Set if the job does not specify a Job Manager task, the user must explicitly add tasks to the job. If the job does specify a Job Manager task, the Batch service creates the Job Manager task when the job is created, and will try to schedule the Job Manager task before scheduling other tasks in the job. The Job Manager task's typical purpose is to control and/or monitor job execution, for example by deciding what additional tasks to run, determining when the work is complete, etc. (However, a Job Manager task is not restricted to these activities - it is a fully-fledged task in the system and perform whatever actions are required for the job.) For example, a Job Manager task might download a file specified as a parameter, analyze the contents of that file and submit additional tasks based on those contents.

Parameters:

jobManagerTask - the jobManagerTask value to set

Returns:

the JobAddParameter object itself.

withJobPreparationTask

public JobAddParameter withJobPreparationTask(JobPreparationTask jobPreparationTask)

Set if a job has a Job Preparation task, the Batch service will run the Job Preparation task on a compute node before starting any tasks of that job on that compute node.

Parameters:

jobPreparationTask - the jobPreparationTask value to set

Returns:

the JobAddParameter object itself.

withJobReleaseTask

public JobAddParameter withJobReleaseTask(JobReleaseTask jobReleaseTask)

Set a Job Release task cannot be specified without also specifying a Job Preparation task for the job. The Batch service runs the Job Release task on the compute nodes that have run the Job Preparation task. The primary purpose of the Job Release task is to undo changes to compute nodes made by the Job Preparation task. Example activities include deleting local files, or shutting down services that were started as part of job preparation.

Parameters:

jobReleaseTask - the jobReleaseTask value to set

Returns:

the JobAddParameter object itself.

withMetadata

public JobAddParameter withMetadata(List metadata)

Set the Batch service does not assign any meaning to metadata; it is solely for the use of user code.

Parameters:

metadata - the metadata value to set

Returns:

the JobAddParameter object itself.

withNetworkConfiguration

public JobAddParameter withNetworkConfiguration(JobNetworkConfiguration networkConfiguration)

Set the networkConfiguration value.

Parameters:

networkConfiguration - the networkConfiguration value to set

Returns:

the JobAddParameter object itself.

withOnAllTasksComplete

public JobAddParameter withOnAllTasksComplete(OnAllTasksComplete onAllTasksComplete)

Set note that if a job contains no tasks, then all tasks are considered complete. This option is therefore most commonly used with a Job Manager task; if you want to use automatic job termination without a Job Manager, you should initially set onAllTasksComplete to noaction and update the job properties to set onAllTasksComplete to terminatejob once you have finished adding tasks. The default is noaction. Possible values include: 'noAction', 'terminateJob'.

Parameters:

onAllTasksComplete - the onAllTasksComplete value to set

Returns:

the JobAddParameter object itself.

withOnTaskFailure

public JobAddParameter withOnTaskFailure(OnTaskFailure onTaskFailure)

Set a task is considered to have failed if has a failureInfo. A failureInfo is set if the task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the task, for example due to a resource file download error. The default is noaction. Possible values include: 'noAction', 'performExitOptionsJobAction'.

Parameters:

onTaskFailure - the onTaskFailure value to set

Returns:

the JobAddParameter object itself.

withPoolInfo

public JobAddParameter withPoolInfo(PoolInformation poolInfo)

Set the poolInfo value.

Parameters:

poolInfo - the poolInfo value to set

Returns:

the JobAddParameter object itself.

withPriority

public JobAddParameter withPriority(Integer priority)

Set priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0.

Parameters:

priority - the priority value to set

Returns:

the JobAddParameter object itself.

withUsesTaskDependencies

public JobAddParameter withUsesTaskDependencies(Boolean usesTaskDependencies)

Set the usesTaskDependencies value.

Parameters:

usesTaskDependencies - the usesTaskDependencies value to set

Returns:

the JobAddParameter object itself.

Applies to