ComputeNode Class

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

public class ComputeNode

A Compute Node in the Batch service.

Constructor Summary

Constructor Description
ComputeNode()

Method Summary

Modifier and Type Method and Description
String affinityId()

Get note that this is just a soft affinity.

org.joda.time.DateTime allocationTime()

Get this is the time when the Compute Node was initially allocated and doesn't change once set.

List<CertificateReference> certificateReferences()

Get for Windows Nodes, the Batch service installs the Certificates to the specified Certificate store and location.

ComputeNodeEndpointConfiguration endpointConfiguration()

Get the endpointConfiguration value.

List<ComputeNodeError> errors()

Get the errors value.

String id()

Get every Compute Node that is added to a Pool is assigned a unique ID.

String ipAddress()

Get every Compute Node that is added to a Pool is assigned a unique IP address.

Boolean isDedicated()

Get the isDedicated value.

org.joda.time.DateTime lastBootTime()

Get this property may not be present if the Compute Node state is unusable.

NodeAgentInformation nodeAgentInfo()

Get the nodeAgentInfo value.

List<TaskInformation> recentTasks()

Get this property is present only if at least one Task has run on this Compute Node since it was assigned to the Pool.

Integer runningTaskSlotsCount()

Get the runningTaskSlotsCount value.

Integer runningTasksCount()

Get the runningTasksCount value.

SchedulingState schedulingState()

Get possible values include: 'enabled', 'disabled'.

StartTask startTask()

Get the startTask value.

StartTaskInformation startTaskInfo()

Get the startTaskInfo value.

ComputeNodeState state()

Get the Spot/Low-priority Compute Node has been preempted.

org.joda.time.DateTime stateTransitionTime()

Get the stateTransitionTime value.

Integer totalTasksRun()

Get the totalTasksRun value.

Integer totalTasksSucceeded()

Get the totalTasksSucceeded value.

String url()

Get the url value.

VirtualMachineInfo virtualMachineInfo()

Get the virtualMachineInfo value.

String vmSize()

Get for information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes).

ComputeNode withAffinityId(String affinityId)

Set note that this is just a soft affinity.

ComputeNode withAllocationTime(DateTime allocationTime)

Set this is the time when the Compute Node was initially allocated and doesn't change once set.

ComputeNode withCertificateReferences(List<CertificateReference> certificateReferences)

Set for Windows Nodes, the Batch service installs the Certificates to the specified Certificate store and location.

ComputeNode withEndpointConfiguration(ComputeNodeEndpointConfiguration endpointConfiguration)

Set the endpointConfiguration value.

ComputeNode withErrors(List<ComputeNodeError> errors)

Set the errors value.

ComputeNode withId(String id)

Set every Compute Node that is added to a Pool is assigned a unique ID.

ComputeNode withIpAddress(String ipAddress)

Set every Compute Node that is added to a Pool is assigned a unique IP address.

ComputeNode withIsDedicated(Boolean isDedicated)

Set the isDedicated value.

ComputeNode withLastBootTime(DateTime lastBootTime)

Set this property may not be present if the Compute Node state is unusable.

ComputeNode withNodeAgentInfo(NodeAgentInformation nodeAgentInfo)

Set the nodeAgentInfo value.

ComputeNode withRecentTasks(List<TaskInformation> recentTasks)

Set this property is present only if at least one Task has run on this Compute Node since it was assigned to the Pool.

ComputeNode withRunningTaskSlotsCount(Integer runningTaskSlotsCount)

Set the runningTaskSlotsCount value.

ComputeNode withRunningTasksCount(Integer runningTasksCount)

Set the runningTasksCount value.

ComputeNode withSchedulingState(SchedulingState schedulingState)

Set possible values include: 'enabled', 'disabled'.

ComputeNode withStartTask(StartTask startTask)

Set the startTask value.

ComputeNode withStartTaskInfo(StartTaskInformation startTaskInfo)

Set the startTaskInfo value.

ComputeNode withState(ComputeNodeState state)

Set the Spot/Low-priority Compute Node has been preempted.

ComputeNode withStateTransitionTime(DateTime stateTransitionTime)

Set the stateTransitionTime value.

ComputeNode withTotalTasksRun(Integer totalTasksRun)

Set the totalTasksRun value.

ComputeNode withTotalTasksSucceeded(Integer totalTasksSucceeded)

Set the totalTasksSucceeded value.

ComputeNode withUrl(String url)

Set the url value.

ComputeNode withVirtualMachineInfo(VirtualMachineInfo virtualMachineInfo)

Set the virtualMachineInfo value.

ComputeNode withVmSize(String vmSize)

Set for information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes).

Methods inherited from java.lang.Object

Constructor Details

ComputeNode

public ComputeNode()

Method Details

affinityId

public String affinityId()

Get 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

allocationTime

public DateTime allocationTime()

Get 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

certificateReferences

public List certificateReferences()

Get 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

endpointConfiguration

public ComputeNodeEndpointConfiguration endpointConfiguration()

Get the endpointConfiguration value.

Returns:

the endpointConfiguration value

errors

public List errors()

Get the errors value.

Returns:

the errors value

id

public String id()

Get 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

ipAddress

public String ipAddress()

Get 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

isDedicated

public Boolean isDedicated()

Get the isDedicated value.

Returns:

the isDedicated value

lastBootTime

public DateTime lastBootTime()

Get this property may not be present if the Compute Node state is unusable.

Returns:

the lastBootTime value

nodeAgentInfo

public NodeAgentInformation nodeAgentInfo()

Get the nodeAgentInfo value.

Returns:

the nodeAgentInfo value

recentTasks

public List recentTasks()

Get 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

runningTaskSlotsCount

public Integer runningTaskSlotsCount()

Get the runningTaskSlotsCount value.

Returns:

the runningTaskSlotsCount value

runningTasksCount

public Integer runningTasksCount()

Get the runningTasksCount value.

Returns:

the runningTasksCount value

schedulingState

public SchedulingState schedulingState()

Get possible values include: 'enabled', 'disabled'.

Returns:

the schedulingState value

startTask

public StartTask startTask()

Get the startTask value.

Returns:

the startTask value

startTaskInfo

public StartTaskInformation startTaskInfo()

Get the startTaskInfo value.

Returns:

the startTaskInfo value

state

public ComputeNodeState state()

Get 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. Possible values include: 'idle', 'rebooting', 'reimaging', 'running', 'unusable', 'creating', 'starting', 'waitingForStartTask', 'startTaskFailed', 'unknown', 'leavingPool', 'offline', 'preempted', 'upgradingOS'.

Returns:

the state value

stateTransitionTime

public DateTime stateTransitionTime()

Get the stateTransitionTime value.

Returns:

the stateTransitionTime value

totalTasksRun

public Integer totalTasksRun()

Get the totalTasksRun value.

Returns:

the totalTasksRun value

totalTasksSucceeded

public Integer totalTasksSucceeded()

Get the totalTasksSucceeded value.

Returns:

the totalTasksSucceeded value

url

public String url()

Get the url value.

Returns:

the url value

virtualMachineInfo

public VirtualMachineInfo virtualMachineInfo()

Get the virtualMachineInfo value.

Returns:

the virtualMachineInfo value

vmSize

public String vmSize()

Get for information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes).

Returns:

the vmSize value

withAffinityId

public ComputeNode withAffinityId(String affinityId)

Set 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.

Parameters:

affinityId - the affinityId value to set

Returns:

the ComputeNode object itself.

withAllocationTime

public ComputeNode withAllocationTime(DateTime allocationTime)

Set 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.

Parameters:

allocationTime - the allocationTime value to set

Returns:

the ComputeNode object itself.

withCertificateReferences

public ComputeNode withCertificateReferences(List certificateReferences)

Set 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.

Parameters:

certificateReferences - the certificateReferences value to set

Returns:

the ComputeNode object itself.

withEndpointConfiguration

public ComputeNode withEndpointConfiguration(ComputeNodeEndpointConfiguration endpointConfiguration)

Set the endpointConfiguration value.

Parameters:

endpointConfiguration - the endpointConfiguration value to set

Returns:

the ComputeNode object itself.

withErrors

public ComputeNode withErrors(List errors)

Set the errors value.

Parameters:

errors - the errors value to set

Returns:

the ComputeNode object itself.

withId

public ComputeNode withId(String id)

Set 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.

Parameters:

id - the id value to set

Returns:

the ComputeNode object itself.

withIpAddress

public ComputeNode withIpAddress(String ipAddress)

Set 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.

Parameters:

ipAddress - the ipAddress value to set

Returns:

the ComputeNode object itself.

withIsDedicated

public ComputeNode withIsDedicated(Boolean isDedicated)

Set the isDedicated value.

Parameters:

isDedicated - the isDedicated value to set

Returns:

the ComputeNode object itself.

withLastBootTime

public ComputeNode withLastBootTime(DateTime lastBootTime)

Set this property may not be present if the Compute Node state is unusable.

Parameters:

lastBootTime - the lastBootTime value to set

Returns:

the ComputeNode object itself.

withNodeAgentInfo

public ComputeNode withNodeAgentInfo(NodeAgentInformation nodeAgentInfo)

Set the nodeAgentInfo value.

Parameters:

nodeAgentInfo - the nodeAgentInfo value to set

Returns:

the ComputeNode object itself.

withRecentTasks

public ComputeNode withRecentTasks(List recentTasks)

Set this property is present only if at least one Task has run on this Compute Node since it was assigned to the Pool.

Parameters:

recentTasks - the recentTasks value to set

Returns:

the ComputeNode object itself.

withRunningTaskSlotsCount

public ComputeNode withRunningTaskSlotsCount(Integer runningTaskSlotsCount)

Set the runningTaskSlotsCount value.

Parameters:

runningTaskSlotsCount - the runningTaskSlotsCount value to set

Returns:

the ComputeNode object itself.

withRunningTasksCount

public ComputeNode withRunningTasksCount(Integer runningTasksCount)

Set the runningTasksCount value.

Parameters:

runningTasksCount - the runningTasksCount value to set

Returns:

the ComputeNode object itself.

withSchedulingState

public ComputeNode withSchedulingState(SchedulingState schedulingState)

Set possible values include: 'enabled', 'disabled'.

Parameters:

schedulingState - the schedulingState value to set

Returns:

the ComputeNode object itself.

withStartTask

public ComputeNode withStartTask(StartTask startTask)

Set the startTask value.

Parameters:

startTask - the startTask value to set

Returns:

the ComputeNode object itself.

withStartTaskInfo

public ComputeNode withStartTaskInfo(StartTaskInformation startTaskInfo)

Set the startTaskInfo value.

Parameters:

startTaskInfo - the startTaskInfo value to set

Returns:

the ComputeNode object itself.

withState

public ComputeNode withState(ComputeNodeState state)

Set 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. Possible values include: 'idle', 'rebooting', 'reimaging', 'running', 'unusable', 'creating', 'starting', 'waitingForStartTask', 'startTaskFailed', 'unknown', 'leavingPool', 'offline', 'preempted', 'upgradingOS'.

Parameters:

state - the state value to set

Returns:

the ComputeNode object itself.

withStateTransitionTime

public ComputeNode withStateTransitionTime(DateTime stateTransitionTime)

Set the stateTransitionTime value.

Parameters:

stateTransitionTime - the stateTransitionTime value to set

Returns:

the ComputeNode object itself.

withTotalTasksRun

public ComputeNode withTotalTasksRun(Integer totalTasksRun)

Set the totalTasksRun value.

Parameters:

totalTasksRun - the totalTasksRun value to set

Returns:

the ComputeNode object itself.

withTotalTasksSucceeded

public ComputeNode withTotalTasksSucceeded(Integer totalTasksSucceeded)

Set the totalTasksSucceeded value.

Parameters:

totalTasksSucceeded - the totalTasksSucceeded value to set

Returns:

the ComputeNode object itself.

withUrl

public ComputeNode withUrl(String url)

Set the url value.

Parameters:

url - the url value to set

Returns:

the ComputeNode object itself.

withVirtualMachineInfo

public ComputeNode withVirtualMachineInfo(VirtualMachineInfo virtualMachineInfo)

Set the virtualMachineInfo value.

Parameters:

virtualMachineInfo - the virtualMachineInfo value to set

Returns:

the ComputeNode object itself.

withVmSize

public ComputeNode withVmSize(String vmSize)

Set for information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes).

Parameters:

vmSize - the vmSize value to set

Returns:

the ComputeNode object itself.

Applies to