StartTaskInformation Class

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

public class StartTaskInformation

Information about a start task running on a compute node.

Method Summary

Modifier and Type Method and Description
TaskContainerExecutionInformation containerInfo()

Get this property is set only if the task runs in a container context.

DateTime endTime()

Get this is the end time of the most recent run of the start task, if that run has completed (even if that run failed and a retry is pending). This element is not present if the start task is currently running.

Integer exitCode()

Get this property is set only if the start task is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the start task (due to timeout, or user termination via the API) you may see an operating system-defined exit code.

TaskFailureInformation failureInfo()

Get this property is set only if the task is in the completed state and encountered a failure.

DateTime lastRetryTime()

Get this element is present only if the task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the task has been restarted for reasons other than retry; for example, if the compute node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not.

TaskExecutionResult result()

Get if the value is 'failed', then the details of the failure can be found in the failureInfo property. Possible values include: 'success', 'failure'.

int retryCount()

Get task application failures (non-zero exit code) are retried, pre-processing errors (the task could not be run) and file upload errors are not retried. The Batch service will retry the task up to the limit specified by the constraints.

DateTime startTime()

Get this value is reset every time the task is restarted or retried (that is, this is the most recent time at which the start task started running).

StartTaskState state()

Get possible values include: 'running', 'completed'.

StartTaskInformation withContainerInfo(TaskContainerExecutionInformation containerInfo)

Set this property is set only if the task runs in a container context.

StartTaskInformation withEndTime(DateTime endTime)

Set this is the end time of the most recent run of the start task, if that run has completed (even if that run failed and a retry is pending). This element is not present if the start task is currently running.

StartTaskInformation withExitCode(Integer exitCode)

Set this property is set only if the start task is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the start task (due to timeout, or user termination via the API) you may see an operating system-defined exit code.

StartTaskInformation withFailureInfo(TaskFailureInformation failureInfo)

Set this property is set only if the task is in the completed state and encountered a failure.

StartTaskInformation withLastRetryTime(DateTime lastRetryTime)

Set this element is present only if the task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the task has been restarted for reasons other than retry; for example, if the compute node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not.

StartTaskInformation withResult(TaskExecutionResult result)

Set if the value is 'failed', then the details of the failure can be found in the failureInfo property. Possible values include: 'success', 'failure'.

StartTaskInformation withRetryCount(int retryCount)

Set task application failures (non-zero exit code) are retried, pre-processing errors (the task could not be run) and file upload errors are not retried. The Batch service will retry the task up to the limit specified by the constraints.

StartTaskInformation withStartTime(DateTime startTime)

Set this value is reset every time the task is restarted or retried (that is, this is the most recent time at which the start task started running).

StartTaskInformation withState(StartTaskState state)

Set possible values include: 'running', 'completed'.

Method Details

containerInfo

public TaskContainerExecutionInformation containerInfo()

Get this property is set only if the task runs in a container context.

Returns:

the containerInfo value

endTime

public DateTime endTime()

Get this is the end time of the most recent run of the start task, if that run has completed (even if that run failed and a retry is pending). This element is not present if the start task is currently running.

Returns:

the endTime value

exitCode

public Integer exitCode()

Get this property is set only if the start task is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the start task (due to timeout, or user termination via the API) you may see an operating system-defined exit code.

Returns:

the exitCode value

failureInfo

public TaskFailureInformation failureInfo()

Get this property is set only if the task is in the completed state and encountered a failure.

Returns:

the failureInfo value

lastRetryTime

public DateTime lastRetryTime()

Get this element is present only if the task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the task has been restarted for reasons other than retry; for example, if the compute node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not.

Returns:

the lastRetryTime value

result

public TaskExecutionResult result()

Get if the value is 'failed', then the details of the failure can be found in the failureInfo property. Possible values include: 'success', 'failure'.

Returns:

the result value

retryCount

public int retryCount()

Get task application failures (non-zero exit code) are retried, pre-processing errors (the task could not be run) and file upload errors are not retried. The Batch service will retry the task up to the limit specified by the constraints.

Returns:

the retryCount value

startTime

public DateTime startTime()

Get this value is reset every time the task is restarted or retried (that is, this is the most recent time at which the start task started running).

Returns:

the startTime value

state

public StartTaskState state()

Get possible values include: 'running', 'completed'.

Returns:

the state value

withContainerInfo

public StartTaskInformation withContainerInfo(TaskContainerExecutionInformation containerInfo)

Set this property is set only if the task runs in a container context.

Parameters:

containerInfo - the containerInfo value to set

Returns:

the StartTaskInformation object itself.

withEndTime

public StartTaskInformation withEndTime(DateTime endTime)

Set this is the end time of the most recent run of the start task, if that run has completed (even if that run failed and a retry is pending). This element is not present if the start task is currently running.

Parameters:

endTime - the endTime value to set

Returns:

the StartTaskInformation object itself.

withExitCode

public StartTaskInformation withExitCode(Integer exitCode)

Set this property is set only if the start task is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the start task (due to timeout, or user termination via the API) you may see an operating system-defined exit code.

Parameters:

exitCode - the exitCode value to set

Returns:

the StartTaskInformation object itself.

withFailureInfo

public StartTaskInformation withFailureInfo(TaskFailureInformation failureInfo)

Set this property is set only if the task is in the completed state and encountered a failure.

Parameters:

failureInfo - the failureInfo value to set

Returns:

the StartTaskInformation object itself.

withLastRetryTime

public StartTaskInformation withLastRetryTime(DateTime lastRetryTime)

Set this element is present only if the task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the task has been restarted for reasons other than retry; for example, if the compute node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not.

Parameters:

lastRetryTime - the lastRetryTime value to set

Returns:

the StartTaskInformation object itself.

withResult

public StartTaskInformation withResult(TaskExecutionResult result)

Set if the value is 'failed', then the details of the failure can be found in the failureInfo property. Possible values include: 'success', 'failure'.

Parameters:

result - the result value to set

Returns:

the StartTaskInformation object itself.

withRetryCount

public StartTaskInformation withRetryCount(int retryCount)

Set task application failures (non-zero exit code) are retried, pre-processing errors (the task could not be run) and file upload errors are not retried. The Batch service will retry the task up to the limit specified by the constraints.

Parameters:

retryCount - the retryCount value to set

Returns:

the StartTaskInformation object itself.

withStartTime

public StartTaskInformation withStartTime(DateTime startTime)

Set this value is reset every time the task is restarted or retried (that is, this is the most recent time at which the start task started running).

Parameters:

startTime - the startTime value to set

Returns:

the StartTaskInformation object itself.

withState

public StartTaskInformation withState(StartTaskState state)

Set possible values include: 'running', 'completed'.

Parameters:

state - the state value to set

Returns:

the StartTaskInformation object itself.

Applies to