@@ -36,10 +36,12 @@ option (google.api.resource_definition) = {
3636// Cloud Dataproc API.
3737service AutoscalingPolicyService {
3838 option (google.api.default_host ) = "dataproc.googleapis.com" ;
39- option (google.api.oauth_scopes ) = "https://www.googleapis.com/auth/cloud-platform" ;
39+ option (google.api.oauth_scopes ) =
40+ "https://www.googleapis.com/auth/cloud-platform" ;
4041
4142 // Creates new autoscaling policy.
42- rpc CreateAutoscalingPolicy (CreateAutoscalingPolicyRequest ) returns (AutoscalingPolicy ) {
43+ rpc CreateAutoscalingPolicy (CreateAutoscalingPolicyRequest )
44+ returns (AutoscalingPolicy ) {
4345 option (google.api.http ) = {
4446 post : "/v1beta2/{parent=projects/*/locations/*}/autoscalingPolicies"
4547 body : "policy"
@@ -55,7 +57,8 @@ service AutoscalingPolicyService {
5557 //
5658 // Disabled check for update_mask, because all updates will be full
5759 // replacements.
58- rpc UpdateAutoscalingPolicy (UpdateAutoscalingPolicyRequest ) returns (AutoscalingPolicy ) {
60+ rpc UpdateAutoscalingPolicy (UpdateAutoscalingPolicyRequest )
61+ returns (AutoscalingPolicy ) {
5962 option (google.api.http ) = {
6063 put : "/v1beta2/{policy.name=projects/*/locations/*/autoscalingPolicies/*}"
6164 body : "policy"
@@ -68,7 +71,8 @@ service AutoscalingPolicyService {
6871 }
6972
7073 // Retrieves autoscaling policy.
71- rpc GetAutoscalingPolicy (GetAutoscalingPolicyRequest ) returns (AutoscalingPolicy ) {
74+ rpc GetAutoscalingPolicy (GetAutoscalingPolicyRequest )
75+ returns (AutoscalingPolicy ) {
7276 option (google.api.http ) = {
7377 get : "/v1beta2/{name=projects/*/locations/*/autoscalingPolicies/*}"
7478 additional_bindings {
@@ -79,7 +83,8 @@ service AutoscalingPolicyService {
7983 }
8084
8185 // Lists autoscaling policies in the project.
82- rpc ListAutoscalingPolicies (ListAutoscalingPoliciesRequest ) returns (ListAutoscalingPoliciesResponse ) {
86+ rpc ListAutoscalingPolicies (ListAutoscalingPoliciesRequest )
87+ returns (ListAutoscalingPoliciesResponse ) {
8388 option (google.api.http ) = {
8489 get : "/v1beta2/{parent=projects/*/locations/*}/autoscalingPolicies"
8590 additional_bindings {
@@ -91,7 +96,8 @@ service AutoscalingPolicyService {
9196
9297 // Deletes an autoscaling policy. It is an error to delete an autoscaling
9398 // policy that is in use by one or more clusters.
94- rpc DeleteAutoscalingPolicy (DeleteAutoscalingPolicyRequest ) returns (google .protobuf .Empty ) {
99+ rpc DeleteAutoscalingPolicy (DeleteAutoscalingPolicyRequest )
100+ returns (google .protobuf .Empty ) {
95101 option (google.api.http ) = {
96102 delete : "/v1beta2/{name=projects/*/locations/*/autoscalingPolicies/*}"
97103 additional_bindings {
@@ -136,22 +142,26 @@ message AutoscalingPolicy {
136142 }
137143
138144 // Required. Describes how the autoscaler will operate for primary workers.
139- InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(google.api.field_behavior ) = REQUIRED ];
145+ InstanceGroupAutoscalingPolicyConfig worker_config = 4
146+ [(google.api.field_behavior ) = REQUIRED ];
140147
141148 // Optional. Describes how the autoscaler will operate for secondary workers.
142- InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(google.api.field_behavior ) = OPTIONAL ];
149+ InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5
150+ [(google.api.field_behavior ) = OPTIONAL ];
143151}
144152
145153// Basic algorithm for autoscaling.
146154message BasicAutoscalingAlgorithm {
147155 // Required. YARN autoscaling configuration.
148- BasicYarnAutoscalingConfig yarn_config = 1 [(google.api.field_behavior ) = REQUIRED ];
156+ BasicYarnAutoscalingConfig yarn_config = 1
157+ [(google.api.field_behavior ) = REQUIRED ];
149158
150159 // Optional. Duration between scaling events. A scaling period starts after
151160 // the update operation from the previous event has completed.
152161 //
153162 // Bounds: [2m, 1d]. Default: 2m.
154- google.protobuf.Duration cooldown_period = 2 [(google.api.field_behavior ) = OPTIONAL ];
163+ google.protobuf.Duration cooldown_period = 2
164+ [(google.api.field_behavior ) = OPTIONAL ];
155165}
156166
157167// Basic autoscaling configurations for YARN.
@@ -162,22 +172,29 @@ message BasicYarnAutoscalingConfig {
162172 // downscaling operations.
163173 //
164174 // Bounds: [0s, 1d].
165- google.protobuf.Duration graceful_decommission_timeout = 5 [(google.api.field_behavior ) = REQUIRED ];
166-
167- // Required. Fraction of average pending memory in the last cooldown period
168- // for which to add workers. A scale-up factor of 1.0 will result in scaling
169- // up so that there is no pending memory remaining after the update (more
170- // aggressive scaling). A scale-up factor closer to 0 will result in a smaller
171- // magnitude of scaling up (less aggressive scaling).
175+ google.protobuf.Duration graceful_decommission_timeout = 5
176+ [(google.api.field_behavior ) = REQUIRED ];
177+
178+ // Required. Fraction of average YARN pending memory in the last cooldown
179+ // period for which to add workers. A scale-up factor of 1.0 will result in
180+ // scaling up so that there is no pending memory remaining after the update
181+ // (more aggressive scaling). A scale-up factor closer to 0 will result in a
182+ // smaller magnitude of scaling up (less aggressive scaling). See [How
183+ // autoscaling
184+ // works](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works)
185+ // for more information.
172186 //
173187 // Bounds: [0.0, 1.0].
174188 double scale_up_factor = 1 [(google.api.field_behavior ) = REQUIRED ];
175189
176- // Required. Fraction of average pending memory in the last cooldown period
177- // for which to remove workers. A scale-down factor of 1 will result in
190+ // Required. Fraction of average YARN pending memory in the last cooldown
191+ // period for which to remove workers. A scale-down factor of 1 will result in
178192 // scaling down so that there is no available memory remaining after the
179193 // update (more aggressive scaling). A scale-down factor of 0 disables
180194 // removing workers, which can be beneficial for autoscaling a single job.
195+ // See [How autoscaling
196+ // works](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works)
197+ // for more information.
181198 //
182199 // Bounds: [0.0, 1.0].
183200 double scale_down_factor = 2 [(google.api.field_behavior ) = REQUIRED ];
@@ -189,7 +206,8 @@ message BasicYarnAutoscalingConfig {
189206 // on any recommended change.
190207 //
191208 // Bounds: [0.0, 1.0]. Default: 0.0.
192- double scale_up_min_worker_fraction = 3 [(google.api.field_behavior ) = OPTIONAL ];
209+ double scale_up_min_worker_fraction = 3
210+ [(google.api.field_behavior ) = OPTIONAL ];
193211
194212 // Optional. Minimum scale-down threshold as a fraction of total cluster size
195213 // before scaling occurs. For example, in a 20-worker cluster, a threshold of
@@ -198,7 +216,8 @@ message BasicYarnAutoscalingConfig {
198216 // on any recommended change.
199217 //
200218 // Bounds: [0.0, 1.0]. Default: 0.0.
201- double scale_down_min_worker_fraction = 4 [(google.api.field_behavior ) = OPTIONAL ];
219+ double scale_down_min_worker_fraction = 4
220+ [(google.api.field_behavior ) = OPTIONAL ];
202221}
203222
204223// Configuration for the size bounds of an instance group, including its
@@ -341,7 +360,8 @@ message ListAutoscalingPoliciesRequest {
341360// A response to a request to list autoscaling policies in a project.
342361message ListAutoscalingPoliciesResponse {
343362 // Output only. Autoscaling policies list.
344- repeated AutoscalingPolicy policies = 1 [(google.api.field_behavior ) = OUTPUT_ONLY ];
363+ repeated AutoscalingPolicy policies = 1
364+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
345365
346366 // Output only. This token is included in the response if there are more
347367 // results to fetch.
0 commit comments