Partilhar via


ComputeBatchModelFactory.BatchNode Method

Definition

Initializes a new instance of BatchNode.

public static Azure.Compute.Batch.BatchNode BatchNode (string id = default, string url = default, Azure.Compute.Batch.BatchNodeState? state = default, Azure.Compute.Batch.SchedulingState? schedulingState = default, DateTimeOffset? stateTransitionTime = default, DateTimeOffset? lastBootTime = default, DateTimeOffset? allocationTime = default, string ipAddress = default, string affinityId = default, string vmSize = default, int? totalTasksRun = default, int? runningTasksCount = default, int? runningTaskSlotsCount = default, int? totalTasksSucceeded = default, System.Collections.Generic.IEnumerable<Azure.Compute.Batch.BatchTaskInfo> recentTasks = default, Azure.Compute.Batch.BatchStartTask startTask = default, Azure.Compute.Batch.BatchStartTaskInfo startTaskInfo = default, System.Collections.Generic.IEnumerable<Azure.Compute.Batch.BatchNodeError> errors = default, bool? isDedicated = default, Azure.Compute.Batch.BatchNodeEndpointConfiguration endpointConfiguration = default, Azure.Compute.Batch.BatchNodeAgentInfo nodeAgentInfo = default, Azure.Compute.Batch.VirtualMachineInfo virtualMachineInfo = default);
static member BatchNode : string * string * Nullable<Azure.Compute.Batch.BatchNodeState> * Nullable<Azure.Compute.Batch.SchedulingState> * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> * string * string * string * Nullable<int> * Nullable<int> * Nullable<int> * Nullable<int> * seq<Azure.Compute.Batch.BatchTaskInfo> * Azure.Compute.Batch.BatchStartTask * Azure.Compute.Batch.BatchStartTaskInfo * seq<Azure.Compute.Batch.BatchNodeError> * Nullable<bool> * Azure.Compute.Batch.BatchNodeEndpointConfiguration * Azure.Compute.Batch.BatchNodeAgentInfo * Azure.Compute.Batch.VirtualMachineInfo -> Azure.Compute.Batch.BatchNode
Public Shared Function BatchNode (Optional id As String = Nothing, Optional url As String = Nothing, Optional state As Nullable(Of BatchNodeState) = Nothing, Optional schedulingState As Nullable(Of SchedulingState) = Nothing, Optional stateTransitionTime As Nullable(Of DateTimeOffset) = Nothing, Optional lastBootTime As Nullable(Of DateTimeOffset) = Nothing, Optional allocationTime As Nullable(Of DateTimeOffset) = Nothing, Optional ipAddress As String = Nothing, Optional affinityId As String = Nothing, Optional vmSize As String = Nothing, Optional totalTasksRun As Nullable(Of Integer) = Nothing, Optional runningTasksCount As Nullable(Of Integer) = Nothing, Optional runningTaskSlotsCount As Nullable(Of Integer) = Nothing, Optional totalTasksSucceeded As Nullable(Of Integer) = Nothing, Optional recentTasks As IEnumerable(Of BatchTaskInfo) = Nothing, Optional startTask As BatchStartTask = Nothing, Optional startTaskInfo As BatchStartTaskInfo = Nothing, Optional errors As IEnumerable(Of BatchNodeError) = Nothing, Optional isDedicated As Nullable(Of Boolean) = Nothing, Optional endpointConfiguration As BatchNodeEndpointConfiguration = Nothing, Optional nodeAgentInfo As BatchNodeAgentInfo = Nothing, Optional virtualMachineInfo As VirtualMachineInfo = Nothing) As BatchNode

Parameters

id
String

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.

url
String

The URL of the Compute Node.

state
Nullable<BatchNodeState>

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.

schedulingState
Nullable<SchedulingState>

Whether the Compute Node is available for Task scheduling.

stateTransitionTime
Nullable<DateTimeOffset>

The time at which the Compute Node entered its current state.

lastBootTime
Nullable<DateTimeOffset>

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

allocationTime
Nullable<DateTimeOffset>

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.

ipAddress
String

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.

affinityId
String

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.

vmSize
String

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://docs.microsoft.com/azure/batch/batch-pool-vm-sizes).

totalTasksRun
Nullable<Int32>

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.

runningTasksCount
Nullable<Int32>

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.

runningTaskSlotsCount
Nullable<Int32>

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.

totalTasksSucceeded
Nullable<Int32>

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.

recentTasks
IEnumerable<BatchTaskInfo>

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.

startTask
BatchStartTask

The Task specified to run on the Compute Node as it joins the Pool.

startTaskInfo
BatchStartTaskInfo

Runtime information about the execution of the StartTask on the Compute Node.

errors
IEnumerable<BatchNodeError>

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

isDedicated
Nullable<Boolean>

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

endpointConfiguration
BatchNodeEndpointConfiguration

The endpoint configuration for the Compute Node.

nodeAgentInfo
BatchNodeAgentInfo

Information about the Compute Node agent version and the time the Compute Node upgraded to a new version.

virtualMachineInfo
VirtualMachineInfo

Info about the current state of the virtual machine.

Returns

A new BatchNode instance for mocking.

Applies to