Package com.azure.compute.batch.models
Class BatchNode
java.lang.Object
com.azure.compute.batch.models.BatchNode
- All Implemented Interfaces:
com.azure.json.JsonSerializable<BatchNode>
A Compute Node in the Batch service.
-
Method Summary
Modifier and TypeMethodDescriptionstatic BatchNode
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of BatchNode from the JsonReader.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.Get the allocationTime property: The time at which this Compute Node was allocated to the Pool.Get the certificateReferences property: For Windows Nodes, the Batch service installs the Certificates to the specified Certificate store and location.Get the endpointConfiguration property: The endpoint configuration for the Compute Node.Get the errors property: The list of errors that are currently being encountered by the Compute Node.getId()
Get the id property: The ID of the Compute Node.Get the ipAddress property: The IP address that other Nodes can use to communicate with this Compute Node.Get the lastBootTime property: The last time at which the Compute Node was started.Get the nodeAgentInfo property: Information about the Compute Node agent version and the time the Compute Node upgraded to a new version.Get the recentTasks property: A list of Tasks whose state has recently changed.Get the runningTasksCount property: The total number of currently running Job Tasks on the Compute Node.Get the runningTaskSlotsCount property: The total number of scheduling slots used by currently running Job Tasks on the Compute Node.Get the schedulingState property: Whether the Compute Node is available for Task scheduling.Get the startTask property: The Task specified to run on the Compute Node as it joins the Pool.Get the startTaskInfo property: Runtime information about the execution of the StartTask on the Compute Node.getState()
Get the state property: The current state of the Compute Node.Get the stateTransitionTime property: The time at which the Compute Node entered its current state.Get the totalTasksRun property: The total number of Job Tasks completed on the Compute Node.Get the totalTasksSucceeded property: The total number of Job Tasks which completed successfully (with exitCode 0) on the Compute Node.getUrl()
Get the url property: The URL of the Compute Node.Get the virtualMachineInfo property: Info about the current state of the virtual machine.Get the vmSize property: The size of the virtual machine hosting the Compute Node.Get the isDedicated property: Whether this Compute Node is a dedicated Compute Node.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Method Details
-
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.
-
getUrl
Get the url property: The URL of the Compute Node.- Returns:
- the url value.
-
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.
-
getSchedulingState
Get the schedulingState property: Whether the Compute Node is available for Task scheduling.- Returns:
- the schedulingState value.
-
getStateTransitionTime
Get the stateTransitionTime property: The time at which the Compute Node entered its current state.- Returns:
- the stateTransitionTime value.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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
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.
-
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.
-
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.
-
getStartTask
Get the startTask property: The Task specified to run on the Compute Node as it joins the Pool.- Returns:
- the startTask value.
-
getStartTaskInfo
Get the startTaskInfo property: Runtime information about the execution of the StartTask on the Compute Node.- Returns:
- the startTaskInfo value.
-
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.
-
getErrors
Get the errors property: The list of errors that are currently being encountered by the Compute Node.- Returns:
- the errors value.
-
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.
-
getEndpointConfiguration
Get the endpointConfiguration property: The endpoint configuration for the Compute Node.- Returns:
- the endpointConfiguration value.
-
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.
-
getVirtualMachineInfo
Get the virtualMachineInfo property: Info about the current state of the virtual machine.- Returns:
- the virtualMachineInfo value.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<BatchNode>
- Throws:
IOException
-
fromJson
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.
-