池调整大小开始事件Pool resize start event

当池调整大小开始时,会发出此事件。This event is emitted when a pool resize has started. 由于池调整大小是异步事件,预计在调整大小操作完成后会发出池调整大小完成事件。Since the pool resize is an asynchronous event, you can expect a pool resize complete event to be emitted once the resize operation completes.

以下示例显示了池调整大小开始事件(即通过手动调整大小将池的大小从 0 调整为 2 个节点)的正文。The following example shows the body of a pool resize start event for a pool resizing from 0 to 2 nodes with a manual resize.

{
    "id": "myPool1",
    "nodeDeallocationOption": "Invalid",
    "currentDedicatedNodes": 0,
    "targetDedicatedNodes": 2,
    "currentLowPriorityNodes": 0,
    "targetLowPriorityNodes": 2,
    "enableAutoScale": false,
    "isAutoPool": false
}
元素Element 类型Type 注释Notes
id StringString 池的 ID。The ID of the pool.
nodeDeallocationOption StringString 指定何时从池中删除节点(如果池的大小正在减小)。Specifies when nodes may be removed from the pool, if the pool size is decreasing.

可能的值包括:Possible values are:

requeue 终止正在运行的任务并将其重新排队。requeue Terminate running tasks and requeue them. 当作业启用时,任务会再次运行。The tasks will run again when the job is enabled. 一旦任务终止,便会立即删除节点。Remove nodes as soon as tasks have been terminated.

terminate 终止正在运行的任务。terminate Terminate running tasks. 任务不会再次运行。The tasks will not run again. 一旦任务终止,便会立即删除节点。Remove nodes as soon as tasks have been terminated.

taskcompletion 允许完成当前正在运行的任务。taskcompletion Allow currently running tasks to complete. 等待时不计划任何新任务。Schedule no new tasks while waiting. 在所有任务完成时,删除节点。Remove nodes when all tasks have completed.

Retaineddata - 允许完成当前正在运行的任务,并等待所有任务数据保留期到期。Retaineddata - Allow currently running tasks to complete, then wait for all task data retention periods to expire. 等待时不计划任何新任务。Schedule no new tasks while waiting. 在所有任务保留期都已过期时,删除节点。Remove nodes when all task retention periods have expired.

默认值为 requeue。The default value is requeue.

如果池的大小正在增加,该值会设置为无效If the pool size is increasing then the value is set to invalid.
currentDedicatedNodes Int32Int32 当前分配到池的计算节点数。The number of compute nodes currently assigned to the pool.
targetDedicatedNodes Int32Int32 池请求的计算节点数。The number of compute nodes that are requested for the pool.
currentLowPriorityNodes Int32Int32 当前分配到池的计算节点数。The number of compute nodes currently assigned to the pool.
targetLowPriorityNodes Int32Int32 池请求的计算节点数。The number of compute nodes that are requested for the pool.
enableAutoScale BoolBool 指定池大小是否随时间自动调整。Specifies whether the pool size automatically adjusts over time.
isAutoPool BoolBool 指定是否已通过作业的 AutoPool 机制创建池。Specifies whether the pool was created via a job's AutoPool mechanism.