Class ComputeNode
- java.lang.Object
-
- com.microsoft.azure.batch.protocol.models.ComputeNode
-
public class ComputeNode extends Object
A Compute Node in the Batch service.
-
-
Constructor Summary
Constructors Constructor Description ComputeNode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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
runningTasksCount()
Get the runningTasksCount value.Integer
runningTaskSlotsCount()
Get the runningTaskSlotsCount 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(org.joda.time.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(org.joda.time.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
withRunningTasksCount(Integer runningTasksCount)
Set the runningTasksCount value.ComputeNode
withRunningTaskSlotsCount(Integer runningTaskSlotsCount)
Set the runningTaskSlotsCount 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(org.joda.time.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).
-
-
-
Method Detail
-
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
-
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.
-
url
public String url()
Get the url value.- Returns:
- the url value
-
withUrl
public ComputeNode withUrl(String url)
Set the url value.- Parameters:
url
- the url value to set- Returns:
- the ComputeNode object itself.
-
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'.- Returns:
- the state value
-
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'.- Parameters:
state
- the state value to set- Returns:
- the ComputeNode object itself.
-
schedulingState
public SchedulingState schedulingState()
Get possible values include: 'enabled', 'disabled'.- Returns:
- the schedulingState value
-
withSchedulingState
public ComputeNode withSchedulingState(SchedulingState schedulingState)
Set possible values include: 'enabled', 'disabled'.- Parameters:
schedulingState
- the schedulingState value to set- Returns:
- the ComputeNode object itself.
-
stateTransitionTime
public org.joda.time.DateTime stateTransitionTime()
Get the stateTransitionTime value.- Returns:
- the stateTransitionTime value
-
withStateTransitionTime
public ComputeNode withStateTransitionTime(org.joda.time.DateTime stateTransitionTime)
Set the stateTransitionTime value.- Parameters:
stateTransitionTime
- the stateTransitionTime value to set- Returns:
- the ComputeNode object itself.
-
lastBootTime
public org.joda.time.DateTime lastBootTime()
Get this property may not be present if the Compute Node state is unusable.- Returns:
- the lastBootTime value
-
withLastBootTime
public ComputeNode withLastBootTime(org.joda.time.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.
-
allocationTime
public org.joda.time.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
-
withAllocationTime
public ComputeNode withAllocationTime(org.joda.time.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.
-
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
-
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.
-
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
-
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.
-
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
-
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.
-
totalTasksRun
public Integer totalTasksRun()
Get the totalTasksRun value.- Returns:
- the totalTasksRun value
-
withTotalTasksRun
public ComputeNode withTotalTasksRun(Integer totalTasksRun)
Set the totalTasksRun value.- Parameters:
totalTasksRun
- the totalTasksRun value to set- Returns:
- the ComputeNode object itself.
-
runningTasksCount
public Integer runningTasksCount()
Get the runningTasksCount value.- Returns:
- the runningTasksCount value
-
withRunningTasksCount
public ComputeNode withRunningTasksCount(Integer runningTasksCount)
Set the runningTasksCount value.- Parameters:
runningTasksCount
- the runningTasksCount value to set- Returns:
- the ComputeNode object itself.
-
runningTaskSlotsCount
public Integer runningTaskSlotsCount()
Get the runningTaskSlotsCount value.- Returns:
- the runningTaskSlotsCount value
-
withRunningTaskSlotsCount
public ComputeNode withRunningTaskSlotsCount(Integer runningTaskSlotsCount)
Set the runningTaskSlotsCount value.- Parameters:
runningTaskSlotsCount
- the runningTaskSlotsCount value to set- Returns:
- the ComputeNode object itself.
-
totalTasksSucceeded
public Integer totalTasksSucceeded()
Get the totalTasksSucceeded value.- Returns:
- the totalTasksSucceeded value
-
withTotalTasksSucceeded
public ComputeNode withTotalTasksSucceeded(Integer totalTasksSucceeded)
Set the totalTasksSucceeded value.- Parameters:
totalTasksSucceeded
- the totalTasksSucceeded value to set- Returns:
- the ComputeNode object itself.
-
recentTasks
public 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.- Returns:
- the recentTasks value
-
withRecentTasks
public 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.- Parameters:
recentTasks
- the recentTasks value to set- Returns:
- the ComputeNode object itself.
-
startTask
public StartTask startTask()
Get the startTask value.- Returns:
- the startTask value
-
withStartTask
public ComputeNode withStartTask(StartTask startTask)
Set the startTask value.- Parameters:
startTask
- the startTask value to set- Returns:
- the ComputeNode object itself.
-
startTaskInfo
public StartTaskInformation startTaskInfo()
Get the startTaskInfo value.- Returns:
- the startTaskInfo value
-
withStartTaskInfo
public ComputeNode withStartTaskInfo(StartTaskInformation startTaskInfo)
Set the startTaskInfo value.- Parameters:
startTaskInfo
- the startTaskInfo value to set- Returns:
- the ComputeNode object itself.
-
certificateReferences
public List<CertificateReference> 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
-
withCertificateReferences
public ComputeNode withCertificateReferences(List<CertificateReference> 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.
-
errors
public List<ComputeNodeError> errors()
Get the errors value.- Returns:
- the errors value
-
withErrors
public ComputeNode withErrors(List<ComputeNodeError> errors)
Set the errors value.- Parameters:
errors
- the errors value to set- Returns:
- the ComputeNode object itself.
-
isDedicated
public Boolean isDedicated()
Get the isDedicated value.- Returns:
- the isDedicated value
-
withIsDedicated
public ComputeNode withIsDedicated(Boolean isDedicated)
Set the isDedicated value.- Parameters:
isDedicated
- the isDedicated value to set- Returns:
- the ComputeNode object itself.
-
endpointConfiguration
public ComputeNodeEndpointConfiguration endpointConfiguration()
Get the endpointConfiguration value.- Returns:
- the endpointConfiguration value
-
withEndpointConfiguration
public ComputeNode withEndpointConfiguration(ComputeNodeEndpointConfiguration endpointConfiguration)
Set the endpointConfiguration value.- Parameters:
endpointConfiguration
- the endpointConfiguration value to set- Returns:
- the ComputeNode object itself.
-
nodeAgentInfo
public NodeAgentInformation nodeAgentInfo()
Get the nodeAgentInfo value.- Returns:
- the nodeAgentInfo value
-
withNodeAgentInfo
public ComputeNode withNodeAgentInfo(NodeAgentInformation nodeAgentInfo)
Set the nodeAgentInfo value.- Parameters:
nodeAgentInfo
- the nodeAgentInfo value to set- Returns:
- the ComputeNode object itself.
-
virtualMachineInfo
public VirtualMachineInfo virtualMachineInfo()
Get the virtualMachineInfo value.- Returns:
- the virtualMachineInfo value
-
withVirtualMachineInfo
public ComputeNode withVirtualMachineInfo(VirtualMachineInfo virtualMachineInfo)
Set the virtualMachineInfo value.- Parameters:
virtualMachineInfo
- the virtualMachineInfo value to set- Returns:
- the ComputeNode object itself.
-
-