@@ -36,10 +36,12 @@ option (google.api.resource_definition) = {
36
36
// Cloud Dataproc API.
37
37
service AutoscalingPolicyService {
38
38
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" ;
40
41
41
42
// Creates new autoscaling policy.
42
- rpc CreateAutoscalingPolicy (CreateAutoscalingPolicyRequest ) returns (AutoscalingPolicy ) {
43
+ rpc CreateAutoscalingPolicy (CreateAutoscalingPolicyRequest )
44
+ returns (AutoscalingPolicy ) {
43
45
option (google.api.http ) = {
44
46
post : "/v1beta2/{parent=projects/*/locations/*}/autoscalingPolicies"
45
47
body : "policy"
@@ -55,7 +57,8 @@ service AutoscalingPolicyService {
55
57
//
56
58
// Disabled check for update_mask, because all updates will be full
57
59
// replacements.
58
- rpc UpdateAutoscalingPolicy (UpdateAutoscalingPolicyRequest ) returns (AutoscalingPolicy ) {
60
+ rpc UpdateAutoscalingPolicy (UpdateAutoscalingPolicyRequest )
61
+ returns (AutoscalingPolicy ) {
59
62
option (google.api.http ) = {
60
63
put : "/v1beta2/{policy.name=projects/*/locations/*/autoscalingPolicies/*}"
61
64
body : "policy"
@@ -68,7 +71,8 @@ service AutoscalingPolicyService {
68
71
}
69
72
70
73
// Retrieves autoscaling policy.
71
- rpc GetAutoscalingPolicy (GetAutoscalingPolicyRequest ) returns (AutoscalingPolicy ) {
74
+ rpc GetAutoscalingPolicy (GetAutoscalingPolicyRequest )
75
+ returns (AutoscalingPolicy ) {
72
76
option (google.api.http ) = {
73
77
get : "/v1beta2/{name=projects/*/locations/*/autoscalingPolicies/*}"
74
78
additional_bindings {
@@ -79,7 +83,8 @@ service AutoscalingPolicyService {
79
83
}
80
84
81
85
// Lists autoscaling policies in the project.
82
- rpc ListAutoscalingPolicies (ListAutoscalingPoliciesRequest ) returns (ListAutoscalingPoliciesResponse ) {
86
+ rpc ListAutoscalingPolicies (ListAutoscalingPoliciesRequest )
87
+ returns (ListAutoscalingPoliciesResponse ) {
83
88
option (google.api.http ) = {
84
89
get : "/v1beta2/{parent=projects/*/locations/*}/autoscalingPolicies"
85
90
additional_bindings {
@@ -91,7 +96,8 @@ service AutoscalingPolicyService {
91
96
92
97
// Deletes an autoscaling policy. It is an error to delete an autoscaling
93
98
// 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 ) {
95
101
option (google.api.http ) = {
96
102
delete : "/v1beta2/{name=projects/*/locations/*/autoscalingPolicies/*}"
97
103
additional_bindings {
@@ -136,22 +142,26 @@ message AutoscalingPolicy {
136
142
}
137
143
138
144
// 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 ];
140
147
141
148
// 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 ];
143
151
}
144
152
145
153
// Basic algorithm for autoscaling.
146
154
message BasicAutoscalingAlgorithm {
147
155
// 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 ];
149
158
150
159
// Optional. Duration between scaling events. A scaling period starts after
151
160
// the update operation from the previous event has completed.
152
161
//
153
162
// 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 ];
155
165
}
156
166
157
167
// Basic autoscaling configurations for YARN.
@@ -162,22 +172,29 @@ message BasicYarnAutoscalingConfig {
162
172
// downscaling operations.
163
173
//
164
174
// 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.
172
186
//
173
187
// Bounds: [0.0, 1.0].
174
188
double scale_up_factor = 1 [(google.api.field_behavior ) = REQUIRED ];
175
189
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
178
192
// scaling down so that there is no available memory remaining after the
179
193
// update (more aggressive scaling). A scale-down factor of 0 disables
180
194
// 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.
181
198
//
182
199
// Bounds: [0.0, 1.0].
183
200
double scale_down_factor = 2 [(google.api.field_behavior ) = REQUIRED ];
@@ -189,7 +206,8 @@ message BasicYarnAutoscalingConfig {
189
206
// on any recommended change.
190
207
//
191
208
// 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 ];
193
211
194
212
// Optional. Minimum scale-down threshold as a fraction of total cluster size
195
213
// before scaling occurs. For example, in a 20-worker cluster, a threshold of
@@ -198,7 +216,8 @@ message BasicYarnAutoscalingConfig {
198
216
// on any recommended change.
199
217
//
200
218
// 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 ];
202
221
}
203
222
204
223
// Configuration for the size bounds of an instance group, including its
@@ -341,7 +360,8 @@ message ListAutoscalingPoliciesRequest {
341
360
// A response to a request to list autoscaling policies in a project.
342
361
message ListAutoscalingPoliciesResponse {
343
362
// 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 ];
345
365
346
366
// Output only. This token is included in the response if there are more
347
367
// results to fetch.
0 commit comments