JobExecutionInformation Class

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

public class JobExecutionInformation

Contains information about the execution of a Job in the Azure Batch service.

Constructor Summary

Constructor Description
JobExecutionInformation()

Method Summary

Modifier and Type Method and Description
org.joda.time.DateTime endTime()

Get this property is set only if the Job is in the completed state.

String poolId()

Get this element contains the actual Pool where the Job is assigned.

JobSchedulingError schedulingError()

Get this property is not set if there was no error starting the Job.

org.joda.time.DateTime startTime()

Get this is the time at which the Job was created.

String terminateReason()

Get this property is set only if the Job is in the completed state.

JobExecutionInformation withEndTime(DateTime endTime)

Set this property is set only if the Job is in the completed state.

JobExecutionInformation withPoolId(String poolId)

Set this element contains the actual Pool where the Job is assigned.

JobExecutionInformation withSchedulingError(JobSchedulingError schedulingError)

Set this property is not set if there was no error starting the Job.

JobExecutionInformation withStartTime(DateTime startTime)

Set this is the time at which the Job was created.

JobExecutionInformation withTerminateReason(String terminateReason)

Set this property is set only if the Job is in the completed state.

Methods inherited from java.lang.Object

Constructor Details

JobExecutionInformation

public JobExecutionInformation()

Method Details

endTime

public DateTime endTime()

Get this property is set only if the Job is in the completed state.

Returns:

the endTime value

poolId

public String poolId()

Get this element contains the actual Pool where the Job is assigned. When you get Job details from the service, they also contain a poolInfo element, which contains the Pool configuration data from when the Job was added or updated. That poolInfo element may also contain a poolId element. If it does, the two IDs are the same. If it does not, it means the Job ran on an auto Pool, and this property contains the ID of that auto Pool.

Returns:

the poolId value

schedulingError

public JobSchedulingError schedulingError()

Get this property is not set if there was no error starting the Job.

Returns:

the schedulingError value

startTime

public DateTime startTime()

Get this is the time at which the Job was created.

Returns:

the startTime value

terminateReason

public String terminateReason()

Get this property is set only if the Job is in the completed state. If the Batch service terminates the Job, it sets the reason as follows: JMComplete - the Job Manager Task completed, and killJobOnCompletion was set to true. MaxWallClockTimeExpiry - the Job reached its maxWallClockTime constraint. TerminateJobSchedule - the Job ran as part of a schedule, and the schedule terminated. AllTasksComplete - the Job's onAllTasksComplete attribute is set to terminatejob, and all Tasks in the Job are complete. TaskFailed - the Job's onTaskFailure attribute is set to performExitOptionsJobAction, and a Task in the Job failed with an exit condition that specified a jobAction of terminatejob. Any other string is a user-defined reason specified in a call to the 'Terminate a Job' operation.

Returns:

the terminateReason value

withEndTime

public JobExecutionInformation withEndTime(DateTime endTime)

Set this property is set only if the Job is in the completed state.

Parameters:

endTime - the endTime value to set

Returns:

the JobExecutionInformation object itself.

withPoolId

public JobExecutionInformation withPoolId(String poolId)

Set this element contains the actual Pool where the Job is assigned. When you get Job details from the service, they also contain a poolInfo element, which contains the Pool configuration data from when the Job was added or updated. That poolInfo element may also contain a poolId element. If it does, the two IDs are the same. If it does not, it means the Job ran on an auto Pool, and this property contains the ID of that auto Pool.

Parameters:

poolId - the poolId value to set

Returns:

the JobExecutionInformation object itself.

withSchedulingError

public JobExecutionInformation withSchedulingError(JobSchedulingError schedulingError)

Set this property is not set if there was no error starting the Job.

Parameters:

schedulingError - the schedulingError value to set

Returns:

the JobExecutionInformation object itself.

withStartTime

public JobExecutionInformation withStartTime(DateTime startTime)

Set this is the time at which the Job was created.

Parameters:

startTime - the startTime value to set

Returns:

the JobExecutionInformation object itself.

withTerminateReason

public JobExecutionInformation withTerminateReason(String terminateReason)

Set this property is set only if the Job is in the completed state. If the Batch service terminates the Job, it sets the reason as follows: JMComplete - the Job Manager Task completed, and killJobOnCompletion was set to true. MaxWallClockTimeExpiry - the Job reached its maxWallClockTime constraint. TerminateJobSchedule - the Job ran as part of a schedule, and the schedule terminated. AllTasksComplete - the Job's onAllTasksComplete attribute is set to terminatejob, and all Tasks in the Job are complete. TaskFailed - the Job's onTaskFailure attribute is set to performExitOptionsJobAction, and a Task in the Job failed with an exit condition that specified a jobAction of terminatejob. Any other string is a user-defined reason specified in a call to the 'Terminate a Job' operation.

Parameters:

terminateReason - the terminateReason value to set

Returns:

the JobExecutionInformation object itself.

Applies to