google-cloud-dataproc-v1 0.15.0 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/client.rb +18 -6
- data/lib/google/cloud/dataproc/v1/batch_controller/client.rb +51 -15
- data/lib/google/cloud/dataproc/v1/batch_controller/operations.rb +12 -14
- data/lib/google/cloud/dataproc/v1/batch_controller/paths.rb +19 -0
- data/lib/google/cloud/dataproc/v1/batches_pb.rb +2 -0
- data/lib/google/cloud/dataproc/v1/cluster_controller/client.rb +43 -31
- data/lib/google/cloud/dataproc/v1/cluster_controller/operations.rb +12 -14
- data/lib/google/cloud/dataproc/v1/cluster_controller/paths.rb +19 -0
- data/lib/google/cloud/dataproc/v1/clusters_pb.rb +10 -9
- data/lib/google/cloud/dataproc/v1/job_controller/client.rb +22 -10
- data/lib/google/cloud/dataproc/v1/job_controller/operations.rb +12 -14
- data/lib/google/cloud/dataproc/v1/jobs_pb.rb +13 -0
- data/lib/google/cloud/dataproc/v1/node_group_controller/client.rb +23 -9
- data/lib/google/cloud/dataproc/v1/node_group_controller/operations.rb +12 -14
- data/lib/google/cloud/dataproc/v1/operations_pb.rb +1 -0
- data/lib/google/cloud/dataproc/v1/shared_pb.rb +24 -1
- data/lib/google/cloud/dataproc/v1/version.rb +1 -1
- data/lib/google/cloud/dataproc/v1/workflow_template_service/client.rb +28 -15
- data/lib/google/cloud/dataproc/v1/workflow_template_service/operations.rb +12 -14
- data/lib/google/cloud/dataproc/v1/workflow_templates_services_pb.rb +2 -1
- data/lib/google/cloud/dataproc/v1.rb +1 -1
- data/proto_docs/google/cloud/dataproc/v1/autoscaling_policies.rb +8 -8
- data/proto_docs/google/cloud/dataproc/v1/batches.rb +42 -14
- data/proto_docs/google/cloud/dataproc/v1/clusters.rb +60 -54
- data/proto_docs/google/cloud/dataproc/v1/jobs.rb +48 -0
- data/proto_docs/google/cloud/dataproc/v1/node_groups.rb +1 -1
- data/proto_docs/google/cloud/dataproc/v1/operations.rb +3 -0
- data/proto_docs/google/cloud/dataproc/v1/shared.rb +174 -56
- data/proto_docs/google/cloud/dataproc/v1/workflow_templates.rb +14 -11
- metadata +26 -6
@@ -18,6 +18,7 @@
|
|
18
18
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/dataproc/v1/jobs_pb"
|
21
|
+
require "google/iam/v1"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -172,6 +173,12 @@ module Google
|
|
172
173
|
config.endpoint = @config.endpoint
|
173
174
|
end
|
174
175
|
|
176
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
177
|
+
config.credentials = credentials
|
178
|
+
config.quota_project = @quota_project_id
|
179
|
+
config.endpoint = @config.endpoint
|
180
|
+
end
|
181
|
+
|
175
182
|
@job_controller_stub = ::Gapic::ServiceStub.new(
|
176
183
|
::Google::Cloud::Dataproc::V1::JobController::Stub,
|
177
184
|
credentials: credentials,
|
@@ -188,6 +195,13 @@ module Google
|
|
188
195
|
#
|
189
196
|
attr_reader :operations_client
|
190
197
|
|
198
|
+
##
|
199
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
200
|
+
#
|
201
|
+
# @return [Google::Iam::V1::IAMPolicy::Client]
|
202
|
+
#
|
203
|
+
attr_reader :iam_policy_client
|
204
|
+
|
191
205
|
# Service calls
|
192
206
|
|
193
207
|
##
|
@@ -355,14 +369,14 @@ module Google
|
|
355
369
|
# # Call the submit_job_as_operation method.
|
356
370
|
# result = client.submit_job_as_operation request
|
357
371
|
#
|
358
|
-
# # The returned object is of type Gapic::Operation. You can use
|
359
|
-
# #
|
360
|
-
# #
|
372
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
373
|
+
# # check the status of an operation, cancel it, or wait for results.
|
374
|
+
# # Here is how to wait for a response.
|
361
375
|
# result.wait_until_done! timeout: 60
|
362
376
|
# if result.response?
|
363
377
|
# p result.response
|
364
378
|
# else
|
365
|
-
# puts "
|
379
|
+
# puts "No response received."
|
366
380
|
# end
|
367
381
|
#
|
368
382
|
def submit_job_as_operation request, options = nil
|
@@ -578,13 +592,11 @@ module Google
|
|
578
592
|
# # Call the list_jobs method.
|
579
593
|
# result = client.list_jobs request
|
580
594
|
#
|
581
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
582
|
-
# #
|
583
|
-
#
|
584
|
-
# # methods are also available for managing paging directly.
|
585
|
-
# result.each do |response|
|
595
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
596
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
597
|
+
# result.each do |item|
|
586
598
|
# # Each element is of type ::Google::Cloud::Dataproc::V1::Job.
|
587
|
-
# p
|
599
|
+
# p item
|
588
600
|
# end
|
589
601
|
#
|
590
602
|
def list_jobs request, options = nil
|
@@ -158,13 +158,11 @@ module Google
|
|
158
158
|
# # Call the list_operations method.
|
159
159
|
# result = client.list_operations request
|
160
160
|
#
|
161
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
162
|
-
# #
|
163
|
-
#
|
164
|
-
# # methods are also available for managing paging directly.
|
165
|
-
# result.each do |response|
|
161
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
162
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
163
|
+
# result.each do |item|
|
166
164
|
# # Each element is of type ::Google::Longrunning::Operation.
|
167
|
-
# p
|
165
|
+
# p item
|
168
166
|
# end
|
169
167
|
#
|
170
168
|
def list_operations request, options = nil
|
@@ -253,14 +251,14 @@ module Google
|
|
253
251
|
# # Call the get_operation method.
|
254
252
|
# result = client.get_operation request
|
255
253
|
#
|
256
|
-
# # The returned object is of type Gapic::Operation. You can use
|
257
|
-
# #
|
258
|
-
# #
|
254
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
255
|
+
# # check the status of an operation, cancel it, or wait for results.
|
256
|
+
# # Here is how to wait for a response.
|
259
257
|
# result.wait_until_done! timeout: 60
|
260
258
|
# if result.response?
|
261
259
|
# p result.response
|
262
260
|
# else
|
263
|
-
# puts "
|
261
|
+
# puts "No response received."
|
264
262
|
# end
|
265
263
|
#
|
266
264
|
def get_operation request, options = nil
|
@@ -540,14 +538,14 @@ module Google
|
|
540
538
|
# # Call the wait_operation method.
|
541
539
|
# result = client.wait_operation request
|
542
540
|
#
|
543
|
-
# # The returned object is of type Gapic::Operation. You can use
|
544
|
-
# #
|
545
|
-
# #
|
541
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
542
|
+
# # check the status of an operation, cancel it, or wait for results.
|
543
|
+
# # Here is how to wait for a response.
|
546
544
|
# result.wait_until_done! timeout: 60
|
547
545
|
# if result.response?
|
548
546
|
# p result.response
|
549
547
|
# else
|
550
|
-
# puts "
|
548
|
+
# puts "No response received."
|
551
549
|
# end
|
552
550
|
#
|
553
551
|
def wait_operation request, options = nil
|
@@ -114,6 +114,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
114
114
|
optional :query_list, :message, 2, "google.cloud.dataproc.v1.QueryList"
|
115
115
|
end
|
116
116
|
end
|
117
|
+
add_message "google.cloud.dataproc.v1.TrinoJob" do
|
118
|
+
optional :continue_on_failure, :bool, 3
|
119
|
+
optional :output_format, :string, 4
|
120
|
+
repeated :client_tags, :string, 5
|
121
|
+
map :properties, :string, :string, 6
|
122
|
+
optional :logging_config, :message, 7, "google.cloud.dataproc.v1.LoggingConfig"
|
123
|
+
oneof :queries do
|
124
|
+
optional :query_file_uri, :string, 1
|
125
|
+
optional :query_list, :message, 2, "google.cloud.dataproc.v1.QueryList"
|
126
|
+
end
|
127
|
+
end
|
117
128
|
add_message "google.cloud.dataproc.v1.JobPlacement" do
|
118
129
|
optional :cluster_name, :string, 1
|
119
130
|
optional :cluster_uuid, :string, 2
|
@@ -186,6 +197,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
186
197
|
optional :spark_r_job, :message, 21, "google.cloud.dataproc.v1.SparkRJob"
|
187
198
|
optional :spark_sql_job, :message, 12, "google.cloud.dataproc.v1.SparkSqlJob"
|
188
199
|
optional :presto_job, :message, 23, "google.cloud.dataproc.v1.PrestoJob"
|
200
|
+
optional :trino_job, :message, 28, "google.cloud.dataproc.v1.TrinoJob"
|
189
201
|
end
|
190
202
|
end
|
191
203
|
add_message "google.cloud.dataproc.v1.DriverSchedulingConfig" do
|
@@ -266,6 +278,7 @@ module Google
|
|
266
278
|
PigJob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.PigJob").msgclass
|
267
279
|
SparkRJob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.SparkRJob").msgclass
|
268
280
|
PrestoJob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.PrestoJob").msgclass
|
281
|
+
TrinoJob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.TrinoJob").msgclass
|
269
282
|
JobPlacement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.JobPlacement").msgclass
|
270
283
|
JobStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.JobStatus").msgclass
|
271
284
|
JobStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.JobStatus.State").enummodule
|
@@ -18,6 +18,7 @@
|
|
18
18
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/dataproc/v1/node_groups_pb"
|
21
|
+
require "google/iam/v1"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -140,6 +141,12 @@ module Google
|
|
140
141
|
config.endpoint = @config.endpoint
|
141
142
|
end
|
142
143
|
|
144
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
145
|
+
config.credentials = credentials
|
146
|
+
config.quota_project = @quota_project_id
|
147
|
+
config.endpoint = @config.endpoint
|
148
|
+
end
|
149
|
+
|
143
150
|
@node_group_controller_stub = ::Gapic::ServiceStub.new(
|
144
151
|
::Google::Cloud::Dataproc::V1::NodeGroupController::Stub,
|
145
152
|
credentials: credentials,
|
@@ -156,6 +163,13 @@ module Google
|
|
156
163
|
#
|
157
164
|
attr_reader :operations_client
|
158
165
|
|
166
|
+
##
|
167
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
168
|
+
#
|
169
|
+
# @return [Google::Iam::V1::IAMPolicy::Client]
|
170
|
+
#
|
171
|
+
attr_reader :iam_policy_client
|
172
|
+
|
159
173
|
# Service calls
|
160
174
|
|
161
175
|
##
|
@@ -223,14 +237,14 @@ module Google
|
|
223
237
|
# # Call the create_node_group method.
|
224
238
|
# result = client.create_node_group request
|
225
239
|
#
|
226
|
-
# # The returned object is of type Gapic::Operation. You can use
|
227
|
-
# #
|
228
|
-
# #
|
240
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
241
|
+
# # check the status of an operation, cancel it, or wait for results.
|
242
|
+
# # Here is how to wait for a response.
|
229
243
|
# result.wait_until_done! timeout: 60
|
230
244
|
# if result.response?
|
231
245
|
# p result.response
|
232
246
|
# else
|
233
|
-
# puts "
|
247
|
+
# puts "No response received."
|
234
248
|
# end
|
235
249
|
#
|
236
250
|
def create_node_group request, options = nil
|
@@ -317,7 +331,7 @@ module Google
|
|
317
331
|
# The ID must contain only letters (a-z, A-Z), numbers (0-9),
|
318
332
|
# underscores (_), and hyphens (-). The maximum length is 40 characters.
|
319
333
|
# @param graceful_decommission_timeout [::Google::Protobuf::Duration, ::Hash]
|
320
|
-
# Optional. Timeout for graceful YARN
|
334
|
+
# Optional. Timeout for graceful YARN decomissioning. [Graceful
|
321
335
|
# decommissioning]
|
322
336
|
# (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning)
|
323
337
|
# allows the removal of nodes from the Compute Engine node group
|
@@ -350,14 +364,14 @@ module Google
|
|
350
364
|
# # Call the resize_node_group method.
|
351
365
|
# result = client.resize_node_group request
|
352
366
|
#
|
353
|
-
# # The returned object is of type Gapic::Operation. You can use
|
354
|
-
# #
|
355
|
-
# #
|
367
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
368
|
+
# # check the status of an operation, cancel it, or wait for results.
|
369
|
+
# # Here is how to wait for a response.
|
356
370
|
# result.wait_until_done! timeout: 60
|
357
371
|
# if result.response?
|
358
372
|
# p result.response
|
359
373
|
# else
|
360
|
-
# puts "
|
374
|
+
# puts "No response received."
|
361
375
|
# end
|
362
376
|
#
|
363
377
|
def resize_node_group request, options = nil
|
@@ -158,13 +158,11 @@ module Google
|
|
158
158
|
# # Call the list_operations method.
|
159
159
|
# result = client.list_operations request
|
160
160
|
#
|
161
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
162
|
-
# #
|
163
|
-
#
|
164
|
-
# # methods are also available for managing paging directly.
|
165
|
-
# result.each do |response|
|
161
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
162
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
163
|
+
# result.each do |item|
|
166
164
|
# # Each element is of type ::Google::Longrunning::Operation.
|
167
|
-
# p
|
165
|
+
# p item
|
168
166
|
# end
|
169
167
|
#
|
170
168
|
def list_operations request, options = nil
|
@@ -253,14 +251,14 @@ module Google
|
|
253
251
|
# # Call the get_operation method.
|
254
252
|
# result = client.get_operation request
|
255
253
|
#
|
256
|
-
# # The returned object is of type Gapic::Operation. You can use
|
257
|
-
# #
|
258
|
-
# #
|
254
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
255
|
+
# # check the status of an operation, cancel it, or wait for results.
|
256
|
+
# # Here is how to wait for a response.
|
259
257
|
# result.wait_until_done! timeout: 60
|
260
258
|
# if result.response?
|
261
259
|
# p result.response
|
262
260
|
# else
|
263
|
-
# puts "
|
261
|
+
# puts "No response received."
|
264
262
|
# end
|
265
263
|
#
|
266
264
|
def get_operation request, options = nil
|
@@ -540,14 +538,14 @@ module Google
|
|
540
538
|
# # Call the wait_operation method.
|
541
539
|
# result = client.wait_operation request
|
542
540
|
#
|
543
|
-
# # The returned object is of type Gapic::Operation. You can use
|
544
|
-
# #
|
545
|
-
# #
|
541
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
542
|
+
# # check the status of an operation, cancel it, or wait for results.
|
543
|
+
# # Here is how to wait for a response.
|
546
544
|
# result.wait_until_done! timeout: 60
|
547
545
|
# if result.response?
|
548
546
|
# p result.response
|
549
547
|
# else
|
550
|
-
# puts "
|
548
|
+
# puts "No response received."
|
551
549
|
# end
|
552
550
|
#
|
553
551
|
def wait_operation request, options = nil
|
@@ -43,6 +43,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
43
43
|
optional :description, :string, 12
|
44
44
|
map :labels, :string, :string, 13
|
45
45
|
repeated :warnings, :string, 14
|
46
|
+
repeated :child_operation_ids, :string, 15
|
46
47
|
end
|
47
48
|
add_message "google.cloud.dataproc.v1.NodeGroupOperationMetadata" do
|
48
49
|
optional :node_group_id, :string, 1
|
@@ -4,6 +4,9 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
require 'google/api/field_behavior_pb'
|
7
|
+
require 'google/api/resource_pb'
|
8
|
+
require 'google/protobuf/duration_pb'
|
9
|
+
require 'google/protobuf/timestamp_pb'
|
7
10
|
|
8
11
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
12
|
add_file("google/cloud/dataproc/v1/shared.proto", :syntax => :proto3) do
|
@@ -20,6 +23,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
20
23
|
optional :service_account, :string, 2
|
21
24
|
repeated :network_tags, :string, 6
|
22
25
|
optional :kms_key, :string, 7
|
26
|
+
optional :ttl, :message, 9, "google.protobuf.Duration"
|
27
|
+
optional :staging_bucket, :string, 10
|
23
28
|
oneof :network do
|
24
29
|
optional :network_uri, :string, 4
|
25
30
|
optional :subnetwork_uri, :string, 5
|
@@ -36,6 +41,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
36
41
|
map :endpoints, :string, :string, 1
|
37
42
|
optional :output_uri, :string, 2
|
38
43
|
optional :diagnostic_output_uri, :string, 3
|
44
|
+
optional :approximate_usage, :message, 6, "google.cloud.dataproc.v1.UsageMetrics"
|
45
|
+
optional :current_usage, :message, 7, "google.cloud.dataproc.v1.UsageSnapshot"
|
46
|
+
end
|
47
|
+
add_message "google.cloud.dataproc.v1.UsageMetrics" do
|
48
|
+
optional :milli_dcu_seconds, :int64, 1
|
49
|
+
optional :shuffle_storage_gb_seconds, :int64, 2
|
50
|
+
end
|
51
|
+
add_message "google.cloud.dataproc.v1.UsageSnapshot" do
|
52
|
+
optional :milli_dcu, :int64, 1
|
53
|
+
optional :shuffle_storage_gb, :int64, 2
|
54
|
+
optional :snapshot_time, :message, 3, "google.protobuf.Timestamp"
|
39
55
|
end
|
40
56
|
add_message "google.cloud.dataproc.v1.GkeClusterConfig" do
|
41
57
|
optional :gke_cluster_target, :string, 2
|
@@ -71,14 +87,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
71
87
|
end
|
72
88
|
add_message "google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig" do
|
73
89
|
optional :machine_type, :string, 1
|
74
|
-
optional :preemptible, :bool, 10
|
75
90
|
optional :local_ssd_count, :int32, 7
|
91
|
+
optional :preemptible, :bool, 10
|
76
92
|
repeated :accelerators, :message, 11, "google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig"
|
77
93
|
optional :min_cpu_platform, :string, 13
|
94
|
+
optional :boot_disk_kms_key, :string, 23
|
95
|
+
optional :spot, :bool, 32
|
78
96
|
end
|
79
97
|
add_message "google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig" do
|
80
98
|
optional :accelerator_count, :int64, 1
|
81
99
|
optional :accelerator_type, :string, 2
|
100
|
+
optional :gpu_partition_size, :string, 3
|
82
101
|
end
|
83
102
|
add_message "google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig" do
|
84
103
|
optional :min_node_count, :int32, 2
|
@@ -92,8 +111,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
92
111
|
value :FLINK, 14
|
93
112
|
value :HBASE, 11
|
94
113
|
value :HIVE_WEBHCAT, 3
|
114
|
+
value :HUDI, 18
|
95
115
|
value :JUPYTER, 1
|
96
116
|
value :PRESTO, 6
|
117
|
+
value :TRINO, 17
|
97
118
|
value :RANGER, 12
|
98
119
|
value :SOLR, 10
|
99
120
|
value :ZEPPELIN, 4
|
@@ -117,6 +138,8 @@ module Google
|
|
117
138
|
SparkHistoryServerConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.SparkHistoryServerConfig").msgclass
|
118
139
|
PeripheralsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.PeripheralsConfig").msgclass
|
119
140
|
RuntimeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.RuntimeInfo").msgclass
|
141
|
+
UsageMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.UsageMetrics").msgclass
|
142
|
+
UsageSnapshot = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.UsageSnapshot").msgclass
|
120
143
|
GkeClusterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.GkeClusterConfig").msgclass
|
121
144
|
KubernetesClusterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.KubernetesClusterConfig").msgclass
|
122
145
|
KubernetesSoftwareConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.KubernetesSoftwareConfig").msgclass
|
@@ -18,6 +18,7 @@
|
|
18
18
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/dataproc/v1/workflow_templates_pb"
|
21
|
+
require "google/iam/v1"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -175,6 +176,12 @@ module Google
|
|
175
176
|
config.endpoint = @config.endpoint
|
176
177
|
end
|
177
178
|
|
179
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
180
|
+
config.credentials = credentials
|
181
|
+
config.quota_project = @quota_project_id
|
182
|
+
config.endpoint = @config.endpoint
|
183
|
+
end
|
184
|
+
|
178
185
|
@workflow_template_service_stub = ::Gapic::ServiceStub.new(
|
179
186
|
::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Stub,
|
180
187
|
credentials: credentials,
|
@@ -191,6 +198,13 @@ module Google
|
|
191
198
|
#
|
192
199
|
attr_reader :operations_client
|
193
200
|
|
201
|
+
##
|
202
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
203
|
+
#
|
204
|
+
# @return [Google::Iam::V1::IAMPolicy::Client]
|
205
|
+
#
|
206
|
+
attr_reader :iam_policy_client
|
207
|
+
|
194
208
|
# Service calls
|
195
209
|
|
196
210
|
##
|
@@ -480,14 +494,14 @@ module Google
|
|
480
494
|
# # Call the instantiate_workflow_template method.
|
481
495
|
# result = client.instantiate_workflow_template request
|
482
496
|
#
|
483
|
-
# # The returned object is of type Gapic::Operation. You can use
|
484
|
-
# #
|
485
|
-
# #
|
497
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
498
|
+
# # check the status of an operation, cancel it, or wait for results.
|
499
|
+
# # Here is how to wait for a response.
|
486
500
|
# result.wait_until_done! timeout: 60
|
487
501
|
# if result.response?
|
488
502
|
# p result.response
|
489
503
|
# else
|
490
|
-
# puts "
|
504
|
+
# puts "No response received."
|
491
505
|
# end
|
492
506
|
#
|
493
507
|
def instantiate_workflow_template request, options = nil
|
@@ -536,7 +550,8 @@ module Google
|
|
536
550
|
# Instantiates a template and begins execution.
|
537
551
|
#
|
538
552
|
# This method is equivalent to executing the sequence
|
539
|
-
# {::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client#create_workflow_template CreateWorkflowTemplate},
|
553
|
+
# {::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client#create_workflow_template CreateWorkflowTemplate},
|
554
|
+
# {::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client#instantiate_workflow_template InstantiateWorkflowTemplate},
|
540
555
|
# {::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client#delete_workflow_template DeleteWorkflowTemplate}.
|
541
556
|
#
|
542
557
|
# The returned Operation can be used to track execution of
|
@@ -617,14 +632,14 @@ module Google
|
|
617
632
|
# # Call the instantiate_inline_workflow_template method.
|
618
633
|
# result = client.instantiate_inline_workflow_template request
|
619
634
|
#
|
620
|
-
# # The returned object is of type Gapic::Operation. You can use
|
621
|
-
# #
|
622
|
-
# #
|
635
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
636
|
+
# # check the status of an operation, cancel it, or wait for results.
|
637
|
+
# # Here is how to wait for a response.
|
623
638
|
# result.wait_until_done! timeout: 60
|
624
639
|
# if result.response?
|
625
640
|
# p result.response
|
626
641
|
# else
|
627
|
-
# puts "
|
642
|
+
# puts "No response received."
|
628
643
|
# end
|
629
644
|
#
|
630
645
|
def instantiate_inline_workflow_template request, options = nil
|
@@ -812,13 +827,11 @@ module Google
|
|
812
827
|
# # Call the list_workflow_templates method.
|
813
828
|
# result = client.list_workflow_templates request
|
814
829
|
#
|
815
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
816
|
-
# #
|
817
|
-
#
|
818
|
-
# # methods are also available for managing paging directly.
|
819
|
-
# result.each do |response|
|
830
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
831
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
832
|
+
# result.each do |item|
|
820
833
|
# # Each element is of type ::Google::Cloud::Dataproc::V1::WorkflowTemplate.
|
821
|
-
# p
|
834
|
+
# p item
|
822
835
|
# end
|
823
836
|
#
|
824
837
|
def list_workflow_templates request, options = nil
|
@@ -158,13 +158,11 @@ module Google
|
|
158
158
|
# # Call the list_operations method.
|
159
159
|
# result = client.list_operations request
|
160
160
|
#
|
161
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
162
|
-
# #
|
163
|
-
#
|
164
|
-
# # methods are also available for managing paging directly.
|
165
|
-
# result.each do |response|
|
161
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
162
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
163
|
+
# result.each do |item|
|
166
164
|
# # Each element is of type ::Google::Longrunning::Operation.
|
167
|
-
# p
|
165
|
+
# p item
|
168
166
|
# end
|
169
167
|
#
|
170
168
|
def list_operations request, options = nil
|
@@ -253,14 +251,14 @@ module Google
|
|
253
251
|
# # Call the get_operation method.
|
254
252
|
# result = client.get_operation request
|
255
253
|
#
|
256
|
-
# # The returned object is of type Gapic::Operation. You can use
|
257
|
-
# #
|
258
|
-
# #
|
254
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
255
|
+
# # check the status of an operation, cancel it, or wait for results.
|
256
|
+
# # Here is how to wait for a response.
|
259
257
|
# result.wait_until_done! timeout: 60
|
260
258
|
# if result.response?
|
261
259
|
# p result.response
|
262
260
|
# else
|
263
|
-
# puts "
|
261
|
+
# puts "No response received."
|
264
262
|
# end
|
265
263
|
#
|
266
264
|
def get_operation request, options = nil
|
@@ -540,14 +538,14 @@ module Google
|
|
540
538
|
# # Call the wait_operation method.
|
541
539
|
# result = client.wait_operation request
|
542
540
|
#
|
543
|
-
# # The returned object is of type Gapic::Operation. You can use
|
544
|
-
# #
|
545
|
-
# #
|
541
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
542
|
+
# # check the status of an operation, cancel it, or wait for results.
|
543
|
+
# # Here is how to wait for a response.
|
546
544
|
# result.wait_until_done! timeout: 60
|
547
545
|
# if result.response?
|
548
546
|
# p result.response
|
549
547
|
# else
|
550
|
-
# puts "
|
548
|
+
# puts "No response received."
|
551
549
|
# end
|
552
550
|
#
|
553
551
|
def wait_operation request, options = nil
|
@@ -65,7 +65,8 @@ module Google
|
|
65
65
|
# Instantiates a template and begins execution.
|
66
66
|
#
|
67
67
|
# This method is equivalent to executing the sequence
|
68
|
-
# [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate],
|
68
|
+
# [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate],
|
69
|
+
# [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate],
|
69
70
|
# [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate].
|
70
71
|
#
|
71
72
|
# The returned Operation can be used to track execution of
|
@@ -20,8 +20,8 @@ require "google/cloud/dataproc/v1/autoscaling_policy_service"
|
|
20
20
|
require "google/cloud/dataproc/v1/batch_controller"
|
21
21
|
require "google/cloud/dataproc/v1/cluster_controller"
|
22
22
|
require "google/cloud/dataproc/v1/job_controller"
|
23
|
-
require "google/cloud/dataproc/v1/workflow_template_service"
|
24
23
|
require "google/cloud/dataproc/v1/node_group_controller"
|
24
|
+
require "google/cloud/dataproc/v1/workflow_template_service"
|
25
25
|
require "google/cloud/dataproc/v1/version"
|
26
26
|
|
27
27
|
module Google
|
@@ -98,20 +98,20 @@ module Google
|
|
98
98
|
# Bounds: [0s, 1d].
|
99
99
|
# @!attribute [rw] scale_up_factor
|
100
100
|
# @return [::Float]
|
101
|
-
# Required. Fraction of average YARN pending memory in the last cooldown
|
102
|
-
# for which to add workers. A scale-up factor of 1.0 will result in
|
103
|
-
# up so that there is no pending memory remaining after the update
|
104
|
-
# aggressive scaling). A scale-up factor closer to 0 will result in a
|
105
|
-
# magnitude of scaling up (less aggressive scaling).
|
106
|
-
#
|
101
|
+
# Required. Fraction of average YARN pending memory in the last cooldown
|
102
|
+
# period for which to add workers. A scale-up factor of 1.0 will result in
|
103
|
+
# scaling up so that there is no pending memory remaining after the update
|
104
|
+
# (more aggressive scaling). A scale-up factor closer to 0 will result in a
|
105
|
+
# smaller magnitude of scaling up (less aggressive scaling). See [How
|
106
|
+
# autoscaling
|
107
107
|
# works](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works)
|
108
108
|
# for more information.
|
109
109
|
#
|
110
110
|
# Bounds: [0.0, 1.0].
|
111
111
|
# @!attribute [rw] scale_down_factor
|
112
112
|
# @return [::Float]
|
113
|
-
# Required. Fraction of average YARN pending memory in the last cooldown
|
114
|
-
# for which to remove workers. A scale-down factor of 1 will result in
|
113
|
+
# Required. Fraction of average YARN pending memory in the last cooldown
|
114
|
+
# period for which to remove workers. A scale-down factor of 1 will result in
|
115
115
|
# scaling down so that there is no available memory remaining after the
|
116
116
|
# update (more aggressive scaling). A scale-down factor of 0 disables
|
117
117
|
# removing workers, which can be beneficial for autoscaling a single job.
|