Share via


BatchSubtask Class

  • java.lang.Object
    • com.azure.compute.batch.models.BatchSubtask

Implements

public final class BatchSubtask
implements JsonSerializable<BatchSubtask>

Information about an Azure Batch subtask.

Method Summary

Modifier and Type Method and Description
static BatchSubtask fromJson(JsonReader jsonReader)

Reads an instance of BatchSubtask from the JsonReader.

BatchTaskContainerExecutionInfo getContainerInfo()

Get the containerInfo property: Information about the container under which the Task is executing.

OffsetDateTime getEndTime()

Get the endTime property: The time at which the subtask completed.

Integer getExitCode()

Get the exitCode property: The exit code of the program specified on the subtask command line.

BatchTaskFailureInfo getFailureInfo()

Get the failureInfo property: Information describing the Task failure, if any.

Integer getId()

Get the id property: The ID of the subtask.

BatchNodeInfo getNodeInfo()

Get the nodeInfo property: Information about the Compute Node on which the subtask ran.

BatchSubtaskState getPreviousState()

Get the previousState property: The previous state of the subtask.

OffsetDateTime getPreviousStateTransitionTime()

Get the previousStateTransitionTime property: The time at which the subtask entered its previous state.

BatchTaskExecutionResult getResult()

Get the result property: The result of the Task execution.

OffsetDateTime getStartTime()

Get the startTime property: The time at which the subtask started running.

BatchSubtaskState getState()

Get the state property: The current state of the subtask.

OffsetDateTime getStateTransitionTime()

Get the stateTransitionTime property: The time at which the subtask entered its current state.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static BatchSubtask fromJson(JsonReader jsonReader)

Reads an instance of BatchSubtask from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of BatchSubtask if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the BatchSubtask.

getContainerInfo

public BatchTaskContainerExecutionInfo getContainerInfo()

Get the containerInfo property: Information about the container under which the Task is executing. This property is set only if the Task runs in a container context.

Returns:

the containerInfo value.

getEndTime

public OffsetDateTime getEndTime()

Get the endTime property: The time at which the subtask completed. This property is set only if the subtask is in the Completed state.

Returns:

the endTime value.

getExitCode

public Integer getExitCode()

Get the exitCode property: The exit code of the program specified on the subtask command line. This property is set only if the subtask 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 subtask (due to timeout, or user termination via the API) you may see an operating system-defined exit code.

Returns:

the exitCode value.

getFailureInfo

public BatchTaskFailureInfo getFailureInfo()

Get the failureInfo property: Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure.

Returns:

the failureInfo value.

getId

public Integer getId()

Get the id property: The ID of the subtask.

Returns:

the id value.

getNodeInfo

public BatchNodeInfo getNodeInfo()

Get the nodeInfo property: Information about the Compute Node on which the subtask ran.

Returns:

the nodeInfo value.

getPreviousState

public BatchSubtaskState getPreviousState()

Get the previousState property: The previous state of the subtask. This property is not set if the subtask is in its initial running state.

Returns:

the previousState value.

getPreviousStateTransitionTime

public OffsetDateTime getPreviousStateTransitionTime()

Get the previousStateTransitionTime property: The time at which the subtask entered its previous state. This property is not set if the subtask is in its initial running state.

Returns:

the previousStateTransitionTime value.

getResult

public BatchTaskExecutionResult getResult()

Get the result property: The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property.

Returns:

the result value.

getStartTime

public OffsetDateTime getStartTime()

Get the startTime property: The time at which the subtask started running. If the subtask has been restarted or retried, this is the most recent time at which the subtask started running.

Returns:

the startTime value.

getState

public BatchSubtaskState getState()

Get the state property: The current state of the subtask.

Returns:

the state value.

getStateTransitionTime

public OffsetDateTime getStateTransitionTime()

Get the stateTransitionTime property: The time at which the subtask entered its current state.

Returns:

the stateTransitionTime value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to