次の方法で共有


JobSpecification Class

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

public class JobSpecification

Specifies details of the Jobs to be created on a schedule.

Constructor Summary

Constructor Description
JobSpecification()

Method Summary

Modifier and Type Method and Description
Boolean allowTaskPreemption()

Get if the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job.

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 constraints value.

String displayName()

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

JobManagerTask jobManagerTask()

Get if the Job does not specify a Job Manager Task, the user must explicitly add Tasks to the Job using the Task API.

JobPreparationTask jobPreparationTask()

Get if a Job has a Job Preparation Task, the Batch service will run the Job Preparation Task on a Node before starting any Tasks of that Job on that Compute Node.

JobReleaseTask jobReleaseTask()

Get the primary purpose of the Job Release Task is to undo changes to Nodes made by the Job Preparation Task.

Integer maxParallelTasks()

Get the value of maxParallelTasks must be -1 or greater than 0 if specified.

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.

OnTaskFailure onTaskFailure()

Get the default is noaction.

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.

Boolean usesTaskDependencies()

Get the usesTaskDependencies value.

JobSpecification withAllowTaskPreemption(Boolean allowTaskPreemption)

Set if the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job.

JobSpecification withCommonEnvironmentSettings(List<EnvironmentSetting> commonEnvironmentSettings)

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

JobSpecification withConstraints(JobConstraints constraints)

Set the constraints value.

JobSpecification withDisplayName(String displayName)

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

JobSpecification withJobManagerTask(JobManagerTask jobManagerTask)

Set if the Job does not specify a Job Manager Task, the user must explicitly add Tasks to the Job using the Task API.

JobSpecification withJobPreparationTask(JobPreparationTask jobPreparationTask)

Set if a Job has a Job Preparation Task, the Batch service will run the Job Preparation Task on a Node before starting any Tasks of that Job on that Compute Node.

JobSpecification withJobReleaseTask(JobReleaseTask jobReleaseTask)

Set the primary purpose of the Job Release Task is to undo changes to Nodes made by the Job Preparation Task.

JobSpecification withMaxParallelTasks(Integer maxParallelTasks)

Set the value of maxParallelTasks must be -1 or greater than 0 if specified.

JobSpecification withMetadata(List<MetadataItem> metadata)

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

JobSpecification withNetworkConfiguration(JobNetworkConfiguration networkConfiguration)

Set the networkConfiguration value.

JobSpecification withOnAllTasksComplete(OnAllTasksComplete onAllTasksComplete)

Set note that if a Job contains no Tasks, then all Tasks are considered complete.

JobSpecification withOnTaskFailure(OnTaskFailure onTaskFailure)

Set the default is noaction.

JobSpecification withPoolInfo(PoolInformation poolInfo)

Set the poolInfo value.

JobSpecification withPriority(Integer priority)

Set priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority.

JobSpecification withUsesTaskDependencies(Boolean usesTaskDependencies)

Set the usesTaskDependencies value.

Methods inherited from java.lang.Object

Constructor Details

JobSpecification

public JobSpecification()

Method Details

allowTaskPreemption

public Boolean allowTaskPreemption()

Get if the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API.

Returns:

the allowTaskPreemption value

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 constraints value.

Returns:

the constraints value

displayName

public String displayName()

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

Returns:

the displayName 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 using the Task API. 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.

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 Node before starting any Tasks of that Job on that Compute Node.

Returns:

the jobPreparationTask value

jobReleaseTask

public JobReleaseTask jobReleaseTask()

Get the primary purpose of the Job Release Task is to undo changes to 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. 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.

Returns:

the jobReleaseTask value

maxParallelTasks

public Integer maxParallelTasks()

Get the value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API.

Returns:

the maxParallelTasks 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 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. This priority is used as the default for all Jobs under the Job Schedule. You can update a Job's priority after it has been created using by using the update Job API.

Returns:

the priority value

usesTaskDependencies

public Boolean usesTaskDependencies()

Get the usesTaskDependencies value.

Returns:

the usesTaskDependencies value

withAllowTaskPreemption

public JobSpecification withAllowTaskPreemption(Boolean allowTaskPreemption)

Set if the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API.

Parameters:

allowTaskPreemption - the allowTaskPreemption value to set

Returns:

the JobSpecification object itself.

withCommonEnvironmentSettings

public JobSpecification 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 JobSpecification object itself.

withConstraints

public JobSpecification withConstraints(JobConstraints constraints)

Set the constraints value.

Parameters:

constraints - the constraints value to set

Returns:

the JobSpecification object itself.

withDisplayName

public JobSpecification withDisplayName(String displayName)

Set the 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 JobSpecification object itself.

withJobManagerTask

public JobSpecification withJobManagerTask(JobManagerTask jobManagerTask)

Set if the Job does not specify a Job Manager Task, the user must explicitly add Tasks to the Job using the Task API. 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.

Parameters:

jobManagerTask - the jobManagerTask value to set

Returns:

the JobSpecification object itself.

withJobPreparationTask

public JobSpecification withJobPreparationTask(JobPreparationTask jobPreparationTask)

Set if a Job has a Job Preparation Task, the Batch service will run the Job Preparation Task on a Node before starting any Tasks of that Job on that Compute Node.

Parameters:

jobPreparationTask - the jobPreparationTask value to set

Returns:

the JobSpecification object itself.

withJobReleaseTask

public JobSpecification withJobReleaseTask(JobReleaseTask jobReleaseTask)

Set the primary purpose of the Job Release Task is to undo changes to 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. 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.

Parameters:

jobReleaseTask - the jobReleaseTask value to set

Returns:

the JobSpecification object itself.

withMaxParallelTasks

public JobSpecification withMaxParallelTasks(Integer maxParallelTasks)

Set the value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API.

Parameters:

maxParallelTasks - the maxParallelTasks value to set

Returns:

the JobSpecification object itself.

withMetadata

public JobSpecification 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 JobSpecification object itself.

withNetworkConfiguration

public JobSpecification withNetworkConfiguration(JobNetworkConfiguration networkConfiguration)

Set the networkConfiguration value.

Parameters:

networkConfiguration - the networkConfiguration value to set

Returns:

the JobSpecification object itself.

withOnAllTasksComplete

public JobSpecification 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 JobSpecification object itself.

withOnTaskFailure

public JobSpecification withOnTaskFailure(OnTaskFailure onTaskFailure)

Set the default is noaction. Possible values include: 'noAction', 'performExitOptionsJobAction'.

Parameters:

onTaskFailure - the onTaskFailure value to set

Returns:

the JobSpecification object itself.

withPoolInfo

public JobSpecification withPoolInfo(PoolInformation poolInfo)

Set the poolInfo value.

Parameters:

poolInfo - the poolInfo value to set

Returns:

the JobSpecification object itself.

withPriority

public JobSpecification 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. This priority is used as the default for all Jobs under the Job Schedule. You can update a Job's priority after it has been created using by using the update Job API.

Parameters:

priority - the priority value to set

Returns:

the JobSpecification object itself.

withUsesTaskDependencies

public JobSpecification withUsesTaskDependencies(Boolean usesTaskDependencies)

Set the usesTaskDependencies value.

Parameters:

usesTaskDependencies - the usesTaskDependencies value to set

Returns:

the JobSpecification object itself.

Applies to