StartTaskInformation Class

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

public class StartTaskInformation

Information about a StartTask running on a Compute Node.

Constructor Summary

Constructor Description
StartTaskInformation()

Method Summary

Modifier and Type Method and Description
TaskContainerExecutionInformation containerInfo()

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

org.joda.time.DateTime endTime()

Get this is the end time of the most recent run of the StartTask, if that run has completed (even if that run failed and a retry is pending).

Integer exitCode()

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

TaskFailureInformation failureInfo()

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

org.joda.time.DateTime lastRetryTime()

Get this element is present only if the Task was retried (i.e.

TaskExecutionResult result()

Get if the value is 'failed', then the details of the failure can be found in the failureInfo property.

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.

org.joda.time.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 StartTask 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 StartTask, if that run has completed (even if that run failed and a retry is pending).

StartTaskInformation withExitCode(Integer exitCode)

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

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.

StartTaskInformation withResult(TaskExecutionResult result)

Set if the value is 'failed', then the details of the failure can be found in the failureInfo property.

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.

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 StartTask started running).

StartTaskInformation withState(StartTaskState state)

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

Methods inherited from java.lang.Object

Constructor Details

StartTaskInformation

public StartTaskInformation()

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 StartTask, if that run has completed (even if that run failed and a retry is pending). This element is not present if the StartTask is currently running.

Returns:

the endTime value

exitCode

public Integer exitCode()

Get this property is set only if the StartTask 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 StartTask (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 StartTask 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 StartTask, if that run has completed (even if that run failed and a retry is pending). This element is not present if the StartTask 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 StartTask 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 StartTask (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 StartTask 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