Resource: AutoscalingPolicy
Describes an autoscaling policy for Dataproc cluster autoscaler.
JSON representation |
---|
{ "id": string, "name": string, "workerConfig": { object ( |
Fields | |
---|---|
id |
Required. The policy id. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 50 characters. |
name |
Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.
|
worker |
Required. Describes how the autoscaler will operate for primary workers. |
secondary |
Optional. Describes how the autoscaler will operate for secondary workers. |
Union field algorithm . Autoscaling algorithm for policy. algorithm can be only one of the following: |
|
basic |
|
BasicAutoscalingAlgorithm
Basic algorithm for autoscaling.
JSON representation |
---|
{ "cooldownPeriod": string, // Union field |
Fields | |
---|---|
cooldown |
Optional. Duration between scaling events. A scaling period starts after the update operation from the previous event has completed. Bounds: [2m, 1d]. Default: 2m. |
Union field
|
|
yarn |
Optional. YARN autoscaling configuration. |
BasicYarnAutoscalingConfig
Basic autoscaling configurations for YARN.
JSON representation |
---|
{ "gracefulDecommissionTimeout": string, "scaleUpFactor": number, "scaleDownFactor": number, "scaleUpMinWorkerFraction": number, "scaleDownMinWorkerFraction": number } |
Fields | |
---|---|
graceful |
Required. Timeout for YARN graceful decommissioning of Node Managers. Specifies the duration to wait for jobs to complete before forcefully removing workers (and potentially interrupting jobs). Only applicable to downscaling operations. Bounds: [0s, 1d]. |
scale |
Required. Fraction of average YARN pending memory in the last cooldown period for which to add workers. A scale-up factor of 1.0 will result in scaling up so that there is no pending memory remaining after the update (more aggressive scaling). A scale-up factor closer to 0 will result in a smaller magnitude of scaling up (less aggressive scaling). See How autoscaling works for more information. Bounds: [0.0, 1.0]. |
scale |
Required. Fraction of average YARN pending memory in the last cooldown period for which to remove workers. A scale-down factor of 1 will result in scaling down so that there is no available memory remaining after the update (more aggressive scaling). A scale-down factor of 0 disables removing workers, which can be beneficial for autoscaling a single job. See How autoscaling works for more information. Bounds: [0.0, 1.0]. |
scale |
Optional. Minimum scale-up threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2-worker scale-up for the cluster to scale. A threshold of 0 means the autoscaler will scale up on any recommended change. Bounds: [0.0, 1.0]. Default: 0.0. |
scale |
Optional. Minimum scale-down threshold as a fraction of total cluster size before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1 means the autoscaler must recommend at least a 2 worker scale-down for the cluster to scale. A threshold of 0 means the autoscaler will scale down on any recommended change. Bounds: [0.0, 1.0]. Default: 0.0. |
InstanceGroupAutoscalingPolicyConfig
Configuration for the size bounds of an instance group, including its proportional size to other groups.
JSON representation |
---|
{ "minInstances": integer, "maxInstances": integer, "weight": integer } |
Fields | |
---|---|
min |
Optional. Minimum number of instances for this group. Primary workers - Bounds: [2, maxInstances]. Default: 2. Secondary workers - Bounds: [0, maxInstances]. Default: 0. |
max |
Required. Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set. Primary workers - Bounds: [minInstances, ). Secondary workers - Bounds: [minInstances, ). Default: 0. |
weight |
Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker. The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers. |
Methods |
|
---|---|
|
Creates new autoscaling policy. |
|
Deletes an autoscaling policy. |
|
Retrieves autoscaling policy. |
|
Gets the access control policy for a resource. |
|
Lists autoscaling policies in the project. |
|
Sets the access control policy on the specified resource. |
|
Returns permissions that a caller has on the specified resource. |
|
Updates (replaces) autoscaling policy. |