Class BatchNode

java.lang.Object
com.azure.compute.batch.models.BatchNode
All Implemented Interfaces:
com.azure.json.JsonSerializable<BatchNode>

public final class BatchNode extends Object implements com.azure.json.JsonSerializable<BatchNode>
A Compute Node in the Batch service.
  • Method Details

    • 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.
    • getUrl

      public String getUrl()
      Get the url property: The URL of the Compute Node.
      Returns:
      the url 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.
    • getSchedulingState

      public SchedulingState getSchedulingState()
      Get the schedulingState property: Whether the Compute Node is available for Task scheduling.
      Returns:
      the schedulingState value.
    • getStateTransitionTime

      public OffsetDateTime getStateTransitionTime()
      Get the stateTransitionTime property: The time at which the Compute Node entered its current state.
      Returns:
      the stateTransitionTime 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • getEndpointConfiguration

      public BatchNodeEndpointConfiguration getEndpointConfiguration()
      Get the endpointConfiguration property: The endpoint configuration for the Compute Node.
      Returns:
      the endpointConfiguration 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.
    • getVirtualMachineInfo

      public VirtualMachineInfo getVirtualMachineInfo()
      Get the virtualMachineInfo property: Info about the current state of the virtual machine.
      Returns:
      the virtualMachineInfo value.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<BatchNode>
      Throws:
      IOException
    • fromJson

      public static BatchNode fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.