Share via


BatchNode Class

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

Implements

public final class BatchNode
implements JsonSerializable<BatchNode>

A Compute Node in the Batch service.

Method Summary

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

Reads an instance of BatchNode from the JsonReader.

String getAffinityId()

Get the affinityId property: An identifier which can be passed when adding a Task to request that the Task be scheduled on this Compute Node.

OffsetDateTime getAllocationTime()

Get the allocationTime property: The time at which this Compute Node was allocated to the Pool.

List<BatchCertificateReference> getCertificateReferences()

Get the certificateReferences property: For Windows Nodes, the Batch service installs the Certificates to the specified Certificate store and location.

BatchNodeEndpointConfiguration getEndpointConfiguration()

Get the endpointConfiguration property: The endpoint configuration for the Compute Node.

List<BatchNodeError> getErrors()

Get the errors property: The list of errors that are currently being encountered by the Compute Node.

String getId()

Get the id property: The ID of the Compute Node.

String getIpAddress()

Get the ipAddress property: The IP address that other Nodes can use to communicate with this Compute Node.

OffsetDateTime getLastBootTime()

Get the lastBootTime property: The last time at which the Compute Node was started.

BatchNodeAgentInfo getNodeAgentInfo()

Get the nodeAgentInfo property: Information about the Compute Node agent version and the time the Compute Node upgraded to a new version.

List<BatchTaskInfo> getRecentTasks()

Get the recentTasks property: A list of Tasks whose state has recently changed.

Integer getRunningTasksCount()

Get the runningTasksCount property: The total number of currently running Job Tasks on the Compute Node.

Integer getRunningTaskSlotsCount()

Get the runningTaskSlotsCount property: The total number of scheduling slots used by currently running Job Tasks on the Compute Node.

SchedulingState getSchedulingState()

Get the schedulingState property: Whether the Compute Node is available for Task scheduling.

BatchStartTask getStartTask()

Get the startTask property: The Task specified to run on the Compute Node as it joins the Pool.

BatchStartTaskInfo getStartTaskInfo()

Get the startTaskInfo property: Runtime information about the execution of the StartTask on the Compute Node.

BatchNodeState getState()

Get the state property: The current state of the Compute Node.

OffsetDateTime getStateTransitionTime()

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

Integer getTotalTasksRun()

Get the totalTasksRun property: The total number of Job Tasks completed on the Compute Node.

Integer getTotalTasksSucceeded()

Get the totalTasksSucceeded property: The total number of Job Tasks which completed successfully (with exitCode 0) on the Compute Node.

String getUrl()

Get the url property: The URL of the Compute Node.

VirtualMachineInfo getVirtualMachineInfo()

Get the virtualMachineInfo property: Info about the current state of the virtual machine.

String getVmSize()

Get the vmSize property: The size of the virtual machine hosting the Compute Node.

Boolean isDedicated()

Get the isDedicated property: Whether this Compute Node is a dedicated Compute Node.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static BatchNode fromJson(JsonReader jsonReader)

Reads an instance of BatchNode from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of BatchNode 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 BatchNode.

getAffinityId

public String getAffinityId()

Get the affinityId property: An identifier which can be passed when adding a Task to request that the Task be scheduled on this Compute Node. Note that this is just a soft affinity. If the target Compute Node is busy or unavailable at the time the Task is scheduled, then the Task will be scheduled elsewhere.

Returns:

the affinityId value.

getAllocationTime

public OffsetDateTime getAllocationTime()

Get the allocationTime property: The time at which this Compute Node was allocated to the Pool. This is the time when the Compute Node was initially allocated and doesn't change once set. It is not updated when the Compute Node is service healed or preempted.

Returns:

the allocationTime value.

getCertificateReferences

public List<BatchCertificateReference> getCertificateReferences()

Get the certificateReferences property: For Windows Nodes, the Batch service installs the Certificates to the specified Certificate store and location. For Linux Compute Nodes, the Certificates are stored in a directory inside the Task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this location. For Certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and Certificates are placed in that directory. Warning: This property is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.

Returns:

the certificateReferences value.

getEndpointConfiguration

public BatchNodeEndpointConfiguration getEndpointConfiguration()

Get the endpointConfiguration property: The endpoint configuration for the Compute Node.

Returns:

the endpointConfiguration value.

getErrors

public List<BatchNodeError> getErrors()

Get the errors property: The list of errors that are currently being encountered by the Compute Node.

Returns:

the errors value.

getId

public String getId()

Get the id property: The ID of the Compute Node. Every Compute Node that is added to a Pool is assigned a unique ID. Whenever a Compute Node is removed from a Pool, all of its local files are deleted, and the ID is reclaimed and could be reused for new Compute Nodes.

Returns:

the id value.

getIpAddress

public String getIpAddress()

Get the ipAddress property: The IP address that other Nodes can use to communicate with this Compute Node. Every Compute Node that is added to a Pool is assigned a unique IP address. Whenever a Compute Node is removed from a Pool, all of its local files are deleted, and the IP address is reclaimed and could be reused for new Compute Nodes.

Returns:

the ipAddress value.

getLastBootTime

public OffsetDateTime getLastBootTime()

Get the lastBootTime property: The last time at which the Compute Node was started. This property may not be present if the Compute Node state is unusable.

Returns:

the lastBootTime value.

getNodeAgentInfo

public BatchNodeAgentInfo getNodeAgentInfo()

Get the nodeAgentInfo property: Information about the Compute Node agent version and the time the Compute Node upgraded to a new version.

Returns:

the nodeAgentInfo value.

getRecentTasks

public List<BatchTaskInfo> getRecentTasks()

Get the recentTasks property: A list of Tasks whose state has recently changed. This property is present only if at least one Task has run on this Compute Node since it was assigned to the Pool.

Returns:

the recentTasks value.

getRunningTasksCount

public Integer getRunningTasksCount()

Get the runningTasksCount property: The total number of currently running Job Tasks on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks.

Returns:

the runningTasksCount value.

getRunningTaskSlotsCount

public Integer getRunningTaskSlotsCount()

Get the runningTaskSlotsCount property: The total number of scheduling slots used by currently running Job Tasks on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks.

Returns:

the runningTaskSlotsCount value.

getSchedulingState

public SchedulingState getSchedulingState()

Get the schedulingState property: Whether the Compute Node is available for Task scheduling.

Returns:

the schedulingState value.

getStartTask

public BatchStartTask getStartTask()

Get the startTask property: The Task specified to run on the Compute Node as it joins the Pool.

Returns:

the startTask value.

getStartTaskInfo

public BatchStartTaskInfo getStartTaskInfo()

Get the startTaskInfo property: Runtime information about the execution of the StartTask on the Compute Node.

Returns:

the startTaskInfo value.

getState

public BatchNodeState getState()

Get the state property: The current state of the Compute Node. The Spot/Low-priority Compute Node has been preempted. Tasks which were running on the Compute Node when it was preempted will be rescheduled when another Compute Node becomes available.

Returns:

the state value.

getStateTransitionTime

public OffsetDateTime getStateTransitionTime()

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

Returns:

the stateTransitionTime value.

getTotalTasksRun

public Integer getTotalTasksRun()

Get the totalTasksRun property: The total number of Job Tasks completed on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks.

Returns:

the totalTasksRun value.

getTotalTasksSucceeded

public Integer getTotalTasksSucceeded()

Get the totalTasksSucceeded property: The total number of Job Tasks which completed successfully (with exitCode 0) on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks.

Returns:

the totalTasksSucceeded value.

getUrl

public String getUrl()

Get the url property: The URL of the Compute Node.

Returns:

the url value.

getVirtualMachineInfo

public VirtualMachineInfo getVirtualMachineInfo()

Get the virtualMachineInfo property: Info about the current state of the virtual machine.

Returns:

the virtualMachineInfo value.

getVmSize

public String getVmSize()

Get the vmSize property: The size of the virtual machine hosting the Compute Node. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://learn.microsoft.com/azure/batch/batch-pool-vm-sizes).

Returns:

the vmSize value.

isDedicated

public Boolean isDedicated()

Get the isDedicated property: Whether this Compute Node is a dedicated Compute Node. If false, the Compute Node is a Spot/Low-priority Compute Node.

Returns:

the isDedicated value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to