google-cloud-dataproc 0.10.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +3 -2
- data/AUTHENTICATION.md +51 -59
- data/LICENSE.md +203 -0
- data/MIGRATING.md +310 -0
- data/README.md +33 -44
- data/lib/{google/cloud/dataproc/v1/doc/google/protobuf/empty.rb → google-cloud-dataproc.rb} +4 -14
- data/lib/google/cloud/dataproc.rb +167 -305
- data/lib/google/cloud/dataproc/version.rb +6 -2
- metadata +97 -100
- data/LICENSE +0 -201
- data/lib/google/cloud/dataproc/v1.rb +0 -371
- data/lib/google/cloud/dataproc/v1/autoscaling_policies_pb.rb +0 -80
- data/lib/google/cloud/dataproc/v1/autoscaling_policies_services_pb.rb +0 -59
- data/lib/google/cloud/dataproc/v1/autoscaling_policy_service_client.rb +0 -494
- data/lib/google/cloud/dataproc/v1/autoscaling_policy_service_client_config.json +0 -51
- data/lib/google/cloud/dataproc/v1/cluster_controller_client.rb +0 -824
- data/lib/google/cloud/dataproc/v1/cluster_controller_client_config.json +0 -59
- data/lib/google/cloud/dataproc/v1/clusters_pb.rb +0 -234
- data/lib/google/cloud/dataproc/v1/clusters_services_pb.rb +0 -69
- data/lib/google/cloud/dataproc/v1/credentials.rb +0 -41
- data/lib/google/cloud/dataproc/v1/doc/google/cloud/dataproc/v1/autoscaling_policies.rb +0 -238
- data/lib/google/cloud/dataproc/v1/doc/google/cloud/dataproc/v1/clusters.rb +0 -819
- data/lib/google/cloud/dataproc/v1/doc/google/cloud/dataproc/v1/jobs.rb +0 -759
- data/lib/google/cloud/dataproc/v1/doc/google/cloud/dataproc/v1/workflow_templates.rb +0 -566
- data/lib/google/cloud/dataproc/v1/doc/google/longrunning/operations.rb +0 -51
- data/lib/google/cloud/dataproc/v1/doc/google/protobuf/any.rb +0 -131
- data/lib/google/cloud/dataproc/v1/doc/google/protobuf/duration.rb +0 -91
- data/lib/google/cloud/dataproc/v1/doc/google/protobuf/field_mask.rb +0 -222
- data/lib/google/cloud/dataproc/v1/doc/google/protobuf/timestamp.rb +0 -113
- data/lib/google/cloud/dataproc/v1/doc/google/rpc/status.rb +0 -39
- data/lib/google/cloud/dataproc/v1/job_controller_client.rb +0 -592
- data/lib/google/cloud/dataproc/v1/job_controller_client_config.json +0 -59
- data/lib/google/cloud/dataproc/v1/jobs_pb.rb +0 -273
- data/lib/google/cloud/dataproc/v1/jobs_services_pb.rb +0 -61
- data/lib/google/cloud/dataproc/v1/operations_pb.rb +0 -45
- data/lib/google/cloud/dataproc/v1/shared_pb.rb +0 -26
- data/lib/google/cloud/dataproc/v1/workflow_template_service_client.rb +0 -770
- data/lib/google/cloud/dataproc/v1/workflow_template_service_client_config.json +0 -64
- data/lib/google/cloud/dataproc/v1/workflow_templates_pb.rb +0 -184
- data/lib/google/cloud/dataproc/v1/workflow_templates_services_pb.rb +0 -105
- data/lib/google/cloud/dataproc/v1beta2.rb +0 -371
- data/lib/google/cloud/dataproc/v1beta2/autoscaling_policies_pb.rb +0 -80
- data/lib/google/cloud/dataproc/v1beta2/autoscaling_policies_services_pb.rb +0 -59
- data/lib/google/cloud/dataproc/v1beta2/autoscaling_policy_service_client.rb +0 -494
- data/lib/google/cloud/dataproc/v1beta2/autoscaling_policy_service_client_config.json +0 -51
- data/lib/google/cloud/dataproc/v1beta2/cluster_controller_client.rb +0 -833
- data/lib/google/cloud/dataproc/v1beta2/cluster_controller_client_config.json +0 -59
- data/lib/google/cloud/dataproc/v1beta2/clusters_pb.rb +0 -241
- data/lib/google/cloud/dataproc/v1beta2/clusters_services_pb.rb +0 -69
- data/lib/google/cloud/dataproc/v1beta2/credentials.rb +0 -41
- data/lib/google/cloud/dataproc/v1beta2/doc/google/cloud/dataproc/v1beta2/autoscaling_policies.rb +0 -238
- data/lib/google/cloud/dataproc/v1beta2/doc/google/cloud/dataproc/v1beta2/clusters.rb +0 -841
- data/lib/google/cloud/dataproc/v1beta2/doc/google/cloud/dataproc/v1beta2/jobs.rb +0 -728
- data/lib/google/cloud/dataproc/v1beta2/doc/google/cloud/dataproc/v1beta2/workflow_templates.rb +0 -579
- data/lib/google/cloud/dataproc/v1beta2/doc/google/longrunning/operations.rb +0 -51
- data/lib/google/cloud/dataproc/v1beta2/doc/google/protobuf/any.rb +0 -131
- data/lib/google/cloud/dataproc/v1beta2/doc/google/protobuf/duration.rb +0 -91
- data/lib/google/cloud/dataproc/v1beta2/doc/google/protobuf/empty.rb +0 -29
- data/lib/google/cloud/dataproc/v1beta2/doc/google/protobuf/field_mask.rb +0 -222
- data/lib/google/cloud/dataproc/v1beta2/doc/google/protobuf/timestamp.rb +0 -113
- data/lib/google/cloud/dataproc/v1beta2/doc/google/rpc/status.rb +0 -39
- data/lib/google/cloud/dataproc/v1beta2/job_controller_client.rb +0 -592
- data/lib/google/cloud/dataproc/v1beta2/job_controller_client_config.json +0 -59
- data/lib/google/cloud/dataproc/v1beta2/jobs_pb.rb +0 -261
- data/lib/google/cloud/dataproc/v1beta2/jobs_services_pb.rb +0 -61
- data/lib/google/cloud/dataproc/v1beta2/operations_pb.rb +0 -44
- data/lib/google/cloud/dataproc/v1beta2/shared_pb.rb +0 -30
- data/lib/google/cloud/dataproc/v1beta2/workflow_template_service_client.rb +0 -778
- data/lib/google/cloud/dataproc/v1beta2/workflow_template_service_client_config.json +0 -64
- data/lib/google/cloud/dataproc/v1beta2/workflow_templates_pb.rb +0 -186
- data/lib/google/cloud/dataproc/v1beta2/workflow_templates_services_pb.rb +0 -105
@@ -1,371 +0,0 @@
|
|
1
|
-
# Copyright 2020 Google LLC
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
|
16
|
-
require "google/cloud/dataproc/v1/cluster_controller_client"
|
17
|
-
require "google/cloud/dataproc/v1/job_controller_client"
|
18
|
-
require "google/cloud/dataproc/v1/workflow_template_service_client"
|
19
|
-
require "google/cloud/dataproc/v1/autoscaling_policy_service_client"
|
20
|
-
require "google/cloud/dataproc/v1/operations_pb"
|
21
|
-
require "google/cloud/dataproc/v1/clusters_pb"
|
22
|
-
require "google/cloud/dataproc/v1/workflow_templates_pb"
|
23
|
-
|
24
|
-
module Google
|
25
|
-
module Cloud
|
26
|
-
module Dataproc
|
27
|
-
# rubocop:disable LineLength
|
28
|
-
|
29
|
-
##
|
30
|
-
# # Ruby Client for Google Cloud Dataproc API
|
31
|
-
#
|
32
|
-
# [Google Cloud Dataproc API][Product Documentation]:
|
33
|
-
# Manages Hadoop-based clusters and jobs on Google Cloud Platform.
|
34
|
-
# - [Product Documentation][]
|
35
|
-
#
|
36
|
-
# ## Quick Start
|
37
|
-
# In order to use this library, you first need to go through the following
|
38
|
-
# steps:
|
39
|
-
#
|
40
|
-
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
41
|
-
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
42
|
-
# 3. [Enable the Google Cloud Dataproc API.](https://console.cloud.google.com/apis/library/dataproc.googleapis.com)
|
43
|
-
# 4. [Setup Authentication.](https://googleapis.dev/ruby/google-cloud-dataproc/latest/file.AUTHENTICATION.html)
|
44
|
-
#
|
45
|
-
# ### Installation
|
46
|
-
# ```
|
47
|
-
# $ gem install google-cloud-dataproc
|
48
|
-
# ```
|
49
|
-
#
|
50
|
-
# ### Preview
|
51
|
-
# #### ClusterControllerClient
|
52
|
-
# ```rb
|
53
|
-
# require "google/cloud/dataproc"
|
54
|
-
#
|
55
|
-
# cluster_controller_client = Google::Cloud::Dataproc::ClusterController.new(version: :v1)
|
56
|
-
# project_id_2 = project_id
|
57
|
-
# region = "global"
|
58
|
-
#
|
59
|
-
# # Iterate over all results.
|
60
|
-
# cluster_controller_client.list_clusters(project_id_2, region).each do |element|
|
61
|
-
# # Process element.
|
62
|
-
# end
|
63
|
-
#
|
64
|
-
# # Or iterate over results one page at a time.
|
65
|
-
# cluster_controller_client.list_clusters(project_id_2, region).each_page do |page|
|
66
|
-
# # Process each page at a time.
|
67
|
-
# page.each do |element|
|
68
|
-
# # Process element.
|
69
|
-
# end
|
70
|
-
# end
|
71
|
-
# ```
|
72
|
-
#
|
73
|
-
# ### Next Steps
|
74
|
-
# - Read the [Google Cloud Dataproc API Product documentation][Product Documentation]
|
75
|
-
# to learn more about the product and see How-to Guides.
|
76
|
-
# - View this [repository's main README](https://github.com/googleapis/google-cloud-ruby/blob/master/README.md)
|
77
|
-
# to see the full list of Cloud APIs that we cover.
|
78
|
-
#
|
79
|
-
# [Product Documentation]: https://cloud.google.com/dataproc
|
80
|
-
#
|
81
|
-
# ## Enabling Logging
|
82
|
-
#
|
83
|
-
# To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
84
|
-
# The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
|
85
|
-
# or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
|
86
|
-
# that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
87
|
-
# and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
88
|
-
#
|
89
|
-
# Configuring a Ruby stdlib logger:
|
90
|
-
#
|
91
|
-
# ```ruby
|
92
|
-
# require "logger"
|
93
|
-
#
|
94
|
-
# module MyLogger
|
95
|
-
# LOGGER = Logger.new $stderr, level: Logger::WARN
|
96
|
-
# def logger
|
97
|
-
# LOGGER
|
98
|
-
# end
|
99
|
-
# end
|
100
|
-
#
|
101
|
-
# # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
102
|
-
# module GRPC
|
103
|
-
# extend MyLogger
|
104
|
-
# end
|
105
|
-
# ```
|
106
|
-
#
|
107
|
-
module V1
|
108
|
-
# rubocop:enable LineLength
|
109
|
-
|
110
|
-
module ClusterController
|
111
|
-
##
|
112
|
-
# The ClusterControllerService provides methods to manage clusters
|
113
|
-
# of Compute Engine instances.
|
114
|
-
#
|
115
|
-
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
116
|
-
# Provides the means for authenticating requests made by the client. This parameter can
|
117
|
-
# be many types.
|
118
|
-
# A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
|
119
|
-
# authenticating requests made by this client.
|
120
|
-
# A `String` will be treated as the path to the keyfile to be used for the construction of
|
121
|
-
# credentials for this client.
|
122
|
-
# A `Hash` will be treated as the contents of a keyfile to be used for the construction of
|
123
|
-
# credentials for this client.
|
124
|
-
# A `GRPC::Core::Channel` will be used to make calls through.
|
125
|
-
# A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
|
126
|
-
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
127
|
-
# A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
|
128
|
-
# metadata for requests, generally, to give OAuth credentials.
|
129
|
-
# @param scopes [Array<String>]
|
130
|
-
# The OAuth scopes for this service. This parameter is ignored if
|
131
|
-
# an updater_proc is supplied.
|
132
|
-
# @param client_config [Hash]
|
133
|
-
# A Hash for call options for each method. See
|
134
|
-
# Google::Gax#construct_settings for the structure of
|
135
|
-
# this data. Falls back to the default config if not specified
|
136
|
-
# or the specified config is missing data points.
|
137
|
-
# @param timeout [Numeric]
|
138
|
-
# The default timeout, in seconds, for calls made through this client.
|
139
|
-
# @param metadata [Hash]
|
140
|
-
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
141
|
-
# @param service_address [String]
|
142
|
-
# Override for the service hostname, or `nil` to leave as the default.
|
143
|
-
# @param service_port [Integer]
|
144
|
-
# Override for the service port, or `nil` to leave as the default.
|
145
|
-
# @param exception_transformer [Proc]
|
146
|
-
# An optional proc that intercepts any exceptions raised during an API call to inject
|
147
|
-
# custom error handling.
|
148
|
-
def self.new \
|
149
|
-
credentials: nil,
|
150
|
-
scopes: nil,
|
151
|
-
client_config: nil,
|
152
|
-
timeout: nil,
|
153
|
-
metadata: nil,
|
154
|
-
service_address: nil,
|
155
|
-
service_port: nil,
|
156
|
-
exception_transformer: nil,
|
157
|
-
lib_name: nil,
|
158
|
-
lib_version: nil
|
159
|
-
kwargs = {
|
160
|
-
credentials: credentials,
|
161
|
-
scopes: scopes,
|
162
|
-
client_config: client_config,
|
163
|
-
timeout: timeout,
|
164
|
-
metadata: metadata,
|
165
|
-
exception_transformer: exception_transformer,
|
166
|
-
lib_name: lib_name,
|
167
|
-
service_address: service_address,
|
168
|
-
service_port: service_port,
|
169
|
-
lib_version: lib_version
|
170
|
-
}.select { |_, v| v != nil }
|
171
|
-
Google::Cloud::Dataproc::V1::ClusterControllerClient.new(**kwargs)
|
172
|
-
end
|
173
|
-
end
|
174
|
-
|
175
|
-
module JobController
|
176
|
-
##
|
177
|
-
# The JobController provides methods to manage jobs.
|
178
|
-
#
|
179
|
-
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
180
|
-
# Provides the means for authenticating requests made by the client. This parameter can
|
181
|
-
# be many types.
|
182
|
-
# A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
|
183
|
-
# authenticating requests made by this client.
|
184
|
-
# A `String` will be treated as the path to the keyfile to be used for the construction of
|
185
|
-
# credentials for this client.
|
186
|
-
# A `Hash` will be treated as the contents of a keyfile to be used for the construction of
|
187
|
-
# credentials for this client.
|
188
|
-
# A `GRPC::Core::Channel` will be used to make calls through.
|
189
|
-
# A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
|
190
|
-
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
191
|
-
# A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
|
192
|
-
# metadata for requests, generally, to give OAuth credentials.
|
193
|
-
# @param scopes [Array<String>]
|
194
|
-
# The OAuth scopes for this service. This parameter is ignored if
|
195
|
-
# an updater_proc is supplied.
|
196
|
-
# @param client_config [Hash]
|
197
|
-
# A Hash for call options for each method. See
|
198
|
-
# Google::Gax#construct_settings for the structure of
|
199
|
-
# this data. Falls back to the default config if not specified
|
200
|
-
# or the specified config is missing data points.
|
201
|
-
# @param timeout [Numeric]
|
202
|
-
# The default timeout, in seconds, for calls made through this client.
|
203
|
-
# @param metadata [Hash]
|
204
|
-
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
205
|
-
# @param service_address [String]
|
206
|
-
# Override for the service hostname, or `nil` to leave as the default.
|
207
|
-
# @param service_port [Integer]
|
208
|
-
# Override for the service port, or `nil` to leave as the default.
|
209
|
-
# @param exception_transformer [Proc]
|
210
|
-
# An optional proc that intercepts any exceptions raised during an API call to inject
|
211
|
-
# custom error handling.
|
212
|
-
def self.new \
|
213
|
-
credentials: nil,
|
214
|
-
scopes: nil,
|
215
|
-
client_config: nil,
|
216
|
-
timeout: nil,
|
217
|
-
metadata: nil,
|
218
|
-
service_address: nil,
|
219
|
-
service_port: nil,
|
220
|
-
exception_transformer: nil,
|
221
|
-
lib_name: nil,
|
222
|
-
lib_version: nil
|
223
|
-
kwargs = {
|
224
|
-
credentials: credentials,
|
225
|
-
scopes: scopes,
|
226
|
-
client_config: client_config,
|
227
|
-
timeout: timeout,
|
228
|
-
metadata: metadata,
|
229
|
-
exception_transformer: exception_transformer,
|
230
|
-
lib_name: lib_name,
|
231
|
-
service_address: service_address,
|
232
|
-
service_port: service_port,
|
233
|
-
lib_version: lib_version
|
234
|
-
}.select { |_, v| v != nil }
|
235
|
-
Google::Cloud::Dataproc::V1::JobControllerClient.new(**kwargs)
|
236
|
-
end
|
237
|
-
end
|
238
|
-
|
239
|
-
module WorkflowTemplateService
|
240
|
-
##
|
241
|
-
# The API interface for managing Workflow Templates in the
|
242
|
-
# Dataproc API.
|
243
|
-
#
|
244
|
-
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
245
|
-
# Provides the means for authenticating requests made by the client. This parameter can
|
246
|
-
# be many types.
|
247
|
-
# A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
|
248
|
-
# authenticating requests made by this client.
|
249
|
-
# A `String` will be treated as the path to the keyfile to be used for the construction of
|
250
|
-
# credentials for this client.
|
251
|
-
# A `Hash` will be treated as the contents of a keyfile to be used for the construction of
|
252
|
-
# credentials for this client.
|
253
|
-
# A `GRPC::Core::Channel` will be used to make calls through.
|
254
|
-
# A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
|
255
|
-
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
256
|
-
# A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
|
257
|
-
# metadata for requests, generally, to give OAuth credentials.
|
258
|
-
# @param scopes [Array<String>]
|
259
|
-
# The OAuth scopes for this service. This parameter is ignored if
|
260
|
-
# an updater_proc is supplied.
|
261
|
-
# @param client_config [Hash]
|
262
|
-
# A Hash for call options for each method. See
|
263
|
-
# Google::Gax#construct_settings for the structure of
|
264
|
-
# this data. Falls back to the default config if not specified
|
265
|
-
# or the specified config is missing data points.
|
266
|
-
# @param timeout [Numeric]
|
267
|
-
# The default timeout, in seconds, for calls made through this client.
|
268
|
-
# @param metadata [Hash]
|
269
|
-
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
270
|
-
# @param service_address [String]
|
271
|
-
# Override for the service hostname, or `nil` to leave as the default.
|
272
|
-
# @param service_port [Integer]
|
273
|
-
# Override for the service port, or `nil` to leave as the default.
|
274
|
-
# @param exception_transformer [Proc]
|
275
|
-
# An optional proc that intercepts any exceptions raised during an API call to inject
|
276
|
-
# custom error handling.
|
277
|
-
def self.new \
|
278
|
-
credentials: nil,
|
279
|
-
scopes: nil,
|
280
|
-
client_config: nil,
|
281
|
-
timeout: nil,
|
282
|
-
metadata: nil,
|
283
|
-
service_address: nil,
|
284
|
-
service_port: nil,
|
285
|
-
exception_transformer: nil,
|
286
|
-
lib_name: nil,
|
287
|
-
lib_version: nil
|
288
|
-
kwargs = {
|
289
|
-
credentials: credentials,
|
290
|
-
scopes: scopes,
|
291
|
-
client_config: client_config,
|
292
|
-
timeout: timeout,
|
293
|
-
metadata: metadata,
|
294
|
-
exception_transformer: exception_transformer,
|
295
|
-
lib_name: lib_name,
|
296
|
-
service_address: service_address,
|
297
|
-
service_port: service_port,
|
298
|
-
lib_version: lib_version
|
299
|
-
}.select { |_, v| v != nil }
|
300
|
-
Google::Cloud::Dataproc::V1::WorkflowTemplateServiceClient.new(**kwargs)
|
301
|
-
end
|
302
|
-
end
|
303
|
-
|
304
|
-
module AutoscalingPolicyService
|
305
|
-
##
|
306
|
-
# The API interface for managing autoscaling policies in the
|
307
|
-
# Dataproc API.
|
308
|
-
#
|
309
|
-
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
310
|
-
# Provides the means for authenticating requests made by the client. This parameter can
|
311
|
-
# be many types.
|
312
|
-
# A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
|
313
|
-
# authenticating requests made by this client.
|
314
|
-
# A `String` will be treated as the path to the keyfile to be used for the construction of
|
315
|
-
# credentials for this client.
|
316
|
-
# A `Hash` will be treated as the contents of a keyfile to be used for the construction of
|
317
|
-
# credentials for this client.
|
318
|
-
# A `GRPC::Core::Channel` will be used to make calls through.
|
319
|
-
# A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
|
320
|
-
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
321
|
-
# A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
|
322
|
-
# metadata for requests, generally, to give OAuth credentials.
|
323
|
-
# @param scopes [Array<String>]
|
324
|
-
# The OAuth scopes for this service. This parameter is ignored if
|
325
|
-
# an updater_proc is supplied.
|
326
|
-
# @param client_config [Hash]
|
327
|
-
# A Hash for call options for each method. See
|
328
|
-
# Google::Gax#construct_settings for the structure of
|
329
|
-
# this data. Falls back to the default config if not specified
|
330
|
-
# or the specified config is missing data points.
|
331
|
-
# @param timeout [Numeric]
|
332
|
-
# The default timeout, in seconds, for calls made through this client.
|
333
|
-
# @param metadata [Hash]
|
334
|
-
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
335
|
-
# @param service_address [String]
|
336
|
-
# Override for the service hostname, or `nil` to leave as the default.
|
337
|
-
# @param service_port [Integer]
|
338
|
-
# Override for the service port, or `nil` to leave as the default.
|
339
|
-
# @param exception_transformer [Proc]
|
340
|
-
# An optional proc that intercepts any exceptions raised during an API call to inject
|
341
|
-
# custom error handling.
|
342
|
-
def self.new \
|
343
|
-
credentials: nil,
|
344
|
-
scopes: nil,
|
345
|
-
client_config: nil,
|
346
|
-
timeout: nil,
|
347
|
-
metadata: nil,
|
348
|
-
service_address: nil,
|
349
|
-
service_port: nil,
|
350
|
-
exception_transformer: nil,
|
351
|
-
lib_name: nil,
|
352
|
-
lib_version: nil
|
353
|
-
kwargs = {
|
354
|
-
credentials: credentials,
|
355
|
-
scopes: scopes,
|
356
|
-
client_config: client_config,
|
357
|
-
timeout: timeout,
|
358
|
-
metadata: metadata,
|
359
|
-
exception_transformer: exception_transformer,
|
360
|
-
lib_name: lib_name,
|
361
|
-
service_address: service_address,
|
362
|
-
service_port: service_port,
|
363
|
-
lib_version: lib_version
|
364
|
-
}.select { |_, v| v != nil }
|
365
|
-
Google::Cloud::Dataproc::V1::AutoscalingPolicyServiceClient.new(**kwargs)
|
366
|
-
end
|
367
|
-
end
|
368
|
-
end
|
369
|
-
end
|
370
|
-
end
|
371
|
-
end
|
@@ -1,80 +0,0 @@
|
|
1
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
-
# source: google/cloud/dataproc/v1/autoscaling_policies.proto
|
3
|
-
|
4
|
-
|
5
|
-
require 'google/protobuf'
|
6
|
-
|
7
|
-
require 'google/api/annotations_pb'
|
8
|
-
require 'google/api/field_behavior_pb'
|
9
|
-
require 'google/api/resource_pb'
|
10
|
-
require 'google/protobuf/duration_pb'
|
11
|
-
require 'google/protobuf/empty_pb'
|
12
|
-
require 'google/api/client_pb'
|
13
|
-
Google::Protobuf::DescriptorPool.generated_pool.build do
|
14
|
-
add_message "google.cloud.dataproc.v1.AutoscalingPolicy" do
|
15
|
-
optional :id, :string, 1
|
16
|
-
optional :name, :string, 2
|
17
|
-
optional :worker_config, :message, 4, "google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig"
|
18
|
-
optional :secondary_worker_config, :message, 5, "google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig"
|
19
|
-
oneof :algorithm do
|
20
|
-
optional :basic_algorithm, :message, 3, "google.cloud.dataproc.v1.BasicAutoscalingAlgorithm"
|
21
|
-
end
|
22
|
-
end
|
23
|
-
add_message "google.cloud.dataproc.v1.BasicAutoscalingAlgorithm" do
|
24
|
-
optional :yarn_config, :message, 1, "google.cloud.dataproc.v1.BasicYarnAutoscalingConfig"
|
25
|
-
optional :cooldown_period, :message, 2, "google.protobuf.Duration"
|
26
|
-
end
|
27
|
-
add_message "google.cloud.dataproc.v1.BasicYarnAutoscalingConfig" do
|
28
|
-
optional :graceful_decommission_timeout, :message, 5, "google.protobuf.Duration"
|
29
|
-
optional :scale_up_factor, :double, 1
|
30
|
-
optional :scale_down_factor, :double, 2
|
31
|
-
optional :scale_up_min_worker_fraction, :double, 3
|
32
|
-
optional :scale_down_min_worker_fraction, :double, 4
|
33
|
-
end
|
34
|
-
add_message "google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig" do
|
35
|
-
optional :min_instances, :int32, 1
|
36
|
-
optional :max_instances, :int32, 2
|
37
|
-
optional :weight, :int32, 3
|
38
|
-
end
|
39
|
-
add_message "google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest" do
|
40
|
-
optional :parent, :string, 1
|
41
|
-
optional :policy, :message, 2, "google.cloud.dataproc.v1.AutoscalingPolicy"
|
42
|
-
end
|
43
|
-
add_message "google.cloud.dataproc.v1.GetAutoscalingPolicyRequest" do
|
44
|
-
optional :name, :string, 1
|
45
|
-
end
|
46
|
-
add_message "google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest" do
|
47
|
-
optional :policy, :message, 1, "google.cloud.dataproc.v1.AutoscalingPolicy"
|
48
|
-
end
|
49
|
-
add_message "google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest" do
|
50
|
-
optional :name, :string, 1
|
51
|
-
end
|
52
|
-
add_message "google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest" do
|
53
|
-
optional :parent, :string, 1
|
54
|
-
optional :page_size, :int32, 2
|
55
|
-
optional :page_token, :string, 3
|
56
|
-
end
|
57
|
-
add_message "google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse" do
|
58
|
-
repeated :policies, :message, 1, "google.cloud.dataproc.v1.AutoscalingPolicy"
|
59
|
-
optional :next_page_token, :string, 2
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
module Google
|
64
|
-
module Cloud
|
65
|
-
module Dataproc
|
66
|
-
module V1
|
67
|
-
AutoscalingPolicy = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.AutoscalingPolicy").msgclass
|
68
|
-
BasicAutoscalingAlgorithm = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.BasicAutoscalingAlgorithm").msgclass
|
69
|
-
BasicYarnAutoscalingConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.BasicYarnAutoscalingConfig").msgclass
|
70
|
-
InstanceGroupAutoscalingPolicyConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig").msgclass
|
71
|
-
CreateAutoscalingPolicyRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest").msgclass
|
72
|
-
GetAutoscalingPolicyRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.GetAutoscalingPolicyRequest").msgclass
|
73
|
-
UpdateAutoscalingPolicyRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest").msgclass
|
74
|
-
DeleteAutoscalingPolicyRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest").msgclass
|
75
|
-
ListAutoscalingPoliciesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest").msgclass
|
76
|
-
ListAutoscalingPoliciesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse").msgclass
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end
|
80
|
-
end
|