google-cloud-dataproc-v1 0.6.3 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/README.md +1 -1
- data/lib/google/cloud/dataproc/v1/autoscaling_policies_pb.rb +3 -2
- data/lib/google/cloud/dataproc/v1/autoscaling_policies_services_pb.rb +1 -1
- data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/client.rb +106 -15
- data/lib/google/cloud/dataproc/v1/batch_controller/client.rb +719 -0
- data/lib/google/cloud/dataproc/v1/batch_controller/credentials.rb +51 -0
- data/lib/google/cloud/dataproc/v1/batch_controller/operations.rb +767 -0
- data/lib/google/cloud/dataproc/v1/batch_controller/paths.rb +69 -0
- data/lib/google/cloud/dataproc/v1/batch_controller.rb +50 -0
- data/lib/google/cloud/dataproc/v1/batches_pb.rb +123 -0
- data/lib/google/cloud/dataproc/v1/batches_services_pb.rb +52 -0
- data/lib/google/cloud/dataproc/v1/cluster_controller/client.rb +266 -49
- data/lib/google/cloud/dataproc/v1/cluster_controller/operations.rb +115 -12
- data/lib/google/cloud/dataproc/v1/cluster_controller/paths.rb +0 -19
- data/lib/google/cloud/dataproc/v1/clusters_pb.rb +23 -10
- data/lib/google/cloud/dataproc/v1/clusters_services_pb.rb +3 -1
- data/lib/google/cloud/dataproc/v1/job_controller/client.rb +187 -32
- data/lib/google/cloud/dataproc/v1/job_controller/operations.rb +115 -12
- data/lib/google/cloud/dataproc/v1/jobs_pb.rb +2 -2
- data/lib/google/cloud/dataproc/v1/jobs_services_pb.rb +1 -1
- data/lib/google/cloud/dataproc/v1/operations_pb.rb +18 -3
- data/lib/google/cloud/dataproc/v1/shared_pb.rb +99 -2
- data/lib/google/cloud/dataproc/v1/version.rb +1 -1
- data/lib/google/cloud/dataproc/v1/workflow_template_service/client.rb +163 -24
- data/lib/google/cloud/dataproc/v1/workflow_template_service/operations.rb +115 -12
- data/lib/google/cloud/dataproc/v1/workflow_template_service/paths.rb +0 -19
- data/lib/google/cloud/dataproc/v1/workflow_templates_pb.rb +2 -2
- data/lib/google/cloud/dataproc/v1/workflow_templates_services_pb.rb +2 -3
- data/lib/google/cloud/dataproc/v1.rb +1 -0
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/dataproc/v1/autoscaling_policies.rb +18 -0
- data/proto_docs/google/cloud/dataproc/v1/batches.rb +339 -0
- data/proto_docs/google/cloud/dataproc/v1/clusters.rb +117 -47
- data/proto_docs/google/cloud/dataproc/v1/jobs.rb +20 -9
- data/proto_docs/google/cloud/dataproc/v1/operations.rb +48 -0
- data/proto_docs/google/cloud/dataproc/v1/shared.rb +336 -1
- data/proto_docs/google/cloud/dataproc/v1/workflow_templates.rb +12 -15
- metadata +11 -3
@@ -143,6 +143,27 @@ module Google
|
|
143
143
|
#
|
144
144
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
145
145
|
#
|
146
|
+
# @example Basic example
|
147
|
+
# require "google/longrunning"
|
148
|
+
#
|
149
|
+
# # Create a client object. The client can be reused for multiple calls.
|
150
|
+
# client = Google::Longrunning::Operations::Client.new
|
151
|
+
#
|
152
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
153
|
+
# request = Google::Longrunning::ListOperationsRequest.new
|
154
|
+
#
|
155
|
+
# # Call the list_operations method.
|
156
|
+
# result = client.list_operations request
|
157
|
+
#
|
158
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
159
|
+
# # iterate over all elements by calling #each, and the enumerable
|
160
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
161
|
+
# # methods are also available for managing paging directly.
|
162
|
+
# result.each do |response|
|
163
|
+
# # Each element is of type ::Google::Longrunning::Operation.
|
164
|
+
# p response
|
165
|
+
# end
|
166
|
+
#
|
146
167
|
def list_operations request, options = nil
|
147
168
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
148
169
|
|
@@ -160,9 +181,11 @@ module Google
|
|
160
181
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
161
182
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
162
183
|
|
163
|
-
header_params = {
|
164
|
-
|
165
|
-
|
184
|
+
header_params = {}
|
185
|
+
if request.name
|
186
|
+
header_params["name"] = request.name
|
187
|
+
end
|
188
|
+
|
166
189
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
167
190
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
168
191
|
|
@@ -215,6 +238,28 @@ module Google
|
|
215
238
|
#
|
216
239
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
217
240
|
#
|
241
|
+
# @example Basic example
|
242
|
+
# require "google/longrunning"
|
243
|
+
#
|
244
|
+
# # Create a client object. The client can be reused for multiple calls.
|
245
|
+
# client = Google::Longrunning::Operations::Client.new
|
246
|
+
#
|
247
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
248
|
+
# request = Google::Longrunning::GetOperationRequest.new
|
249
|
+
#
|
250
|
+
# # Call the get_operation method.
|
251
|
+
# result = client.get_operation request
|
252
|
+
#
|
253
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
254
|
+
# # object to check the status of an operation, cancel it, or wait
|
255
|
+
# # for results. Here is how to block until completion:
|
256
|
+
# result.wait_until_done! timeout: 60
|
257
|
+
# if result.response?
|
258
|
+
# p result.response
|
259
|
+
# else
|
260
|
+
# puts "Error!"
|
261
|
+
# end
|
262
|
+
#
|
218
263
|
def get_operation request, options = nil
|
219
264
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
220
265
|
|
@@ -232,9 +277,11 @@ module Google
|
|
232
277
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
233
278
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
234
279
|
|
235
|
-
header_params = {
|
236
|
-
|
237
|
-
|
280
|
+
header_params = {}
|
281
|
+
if request.name
|
282
|
+
header_params["name"] = request.name
|
283
|
+
end
|
284
|
+
|
238
285
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
239
286
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
240
287
|
|
@@ -287,6 +334,21 @@ module Google
|
|
287
334
|
#
|
288
335
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
289
336
|
#
|
337
|
+
# @example Basic example
|
338
|
+
# require "google/longrunning"
|
339
|
+
#
|
340
|
+
# # Create a client object. The client can be reused for multiple calls.
|
341
|
+
# client = Google::Longrunning::Operations::Client.new
|
342
|
+
#
|
343
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
344
|
+
# request = Google::Longrunning::DeleteOperationRequest.new
|
345
|
+
#
|
346
|
+
# # Call the delete_operation method.
|
347
|
+
# result = client.delete_operation request
|
348
|
+
#
|
349
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
350
|
+
# p result
|
351
|
+
#
|
290
352
|
def delete_operation request, options = nil
|
291
353
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
292
354
|
|
@@ -304,9 +366,11 @@ module Google
|
|
304
366
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
305
367
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
306
368
|
|
307
|
-
header_params = {
|
308
|
-
|
309
|
-
|
369
|
+
header_params = {}
|
370
|
+
if request.name
|
371
|
+
header_params["name"] = request.name
|
372
|
+
end
|
373
|
+
|
310
374
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
311
375
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
312
376
|
|
@@ -364,6 +428,21 @@ module Google
|
|
364
428
|
#
|
365
429
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
366
430
|
#
|
431
|
+
# @example Basic example
|
432
|
+
# require "google/longrunning"
|
433
|
+
#
|
434
|
+
# # Create a client object. The client can be reused for multiple calls.
|
435
|
+
# client = Google::Longrunning::Operations::Client.new
|
436
|
+
#
|
437
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
438
|
+
# request = Google::Longrunning::CancelOperationRequest.new
|
439
|
+
#
|
440
|
+
# # Call the cancel_operation method.
|
441
|
+
# result = client.cancel_operation request
|
442
|
+
#
|
443
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
444
|
+
# p result
|
445
|
+
#
|
367
446
|
def cancel_operation request, options = nil
|
368
447
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
369
448
|
|
@@ -381,9 +460,11 @@ module Google
|
|
381
460
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
382
461
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
383
462
|
|
384
|
-
header_params = {
|
385
|
-
|
386
|
-
|
463
|
+
header_params = {}
|
464
|
+
if request.name
|
465
|
+
header_params["name"] = request.name
|
466
|
+
end
|
467
|
+
|
387
468
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
388
469
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
389
470
|
|
@@ -444,6 +525,28 @@ module Google
|
|
444
525
|
#
|
445
526
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
446
527
|
#
|
528
|
+
# @example Basic example
|
529
|
+
# require "google/longrunning"
|
530
|
+
#
|
531
|
+
# # Create a client object. The client can be reused for multiple calls.
|
532
|
+
# client = Google::Longrunning::Operations::Client.new
|
533
|
+
#
|
534
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
535
|
+
# request = Google::Longrunning::WaitOperationRequest.new
|
536
|
+
#
|
537
|
+
# # Call the wait_operation method.
|
538
|
+
# result = client.wait_operation request
|
539
|
+
#
|
540
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
541
|
+
# # object to check the status of an operation, cancel it, or wait
|
542
|
+
# # for results. Here is how to block until completion:
|
543
|
+
# result.wait_until_done! timeout: 60
|
544
|
+
# if result.response?
|
545
|
+
# p result.response
|
546
|
+
# else
|
547
|
+
# puts "Error!"
|
548
|
+
# end
|
549
|
+
#
|
447
550
|
def wait_operation request, options = nil
|
448
551
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
449
552
|
|
@@ -24,25 +24,6 @@ module Google
|
|
24
24
|
module ClusterController
|
25
25
|
# Path helper methods for the ClusterController API.
|
26
26
|
module Paths
|
27
|
-
##
|
28
|
-
# Create a fully-qualified Cluster resource string.
|
29
|
-
#
|
30
|
-
# The resource will be in the following format:
|
31
|
-
#
|
32
|
-
# `projects/{project}/locations/{location}/clusters/{cluster}`
|
33
|
-
#
|
34
|
-
# @param project [String]
|
35
|
-
# @param location [String]
|
36
|
-
# @param cluster [String]
|
37
|
-
#
|
38
|
-
# @return [::String]
|
39
|
-
def cluster_path project:, location:, cluster:
|
40
|
-
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
41
|
-
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
42
|
-
|
43
|
-
"projects/#{project}/locations/#{location}/clusters/#{cluster}"
|
44
|
-
end
|
45
|
-
|
46
27
|
##
|
47
28
|
# Create a fully-qualified Service resource string.
|
48
29
|
#
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/dataproc/v1/clusters.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/annotations_pb'
|
7
5
|
require 'google/api/client_pb'
|
8
6
|
require 'google/api/field_behavior_pb'
|
@@ -12,12 +10,15 @@ require 'google/longrunning/operations_pb'
|
|
12
10
|
require 'google/protobuf/duration_pb'
|
13
11
|
require 'google/protobuf/field_mask_pb'
|
14
12
|
require 'google/protobuf/timestamp_pb'
|
13
|
+
require 'google/protobuf'
|
14
|
+
|
15
15
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
16
16
|
add_file("google/cloud/dataproc/v1/clusters.proto", :syntax => :proto3) do
|
17
17
|
add_message "google.cloud.dataproc.v1.Cluster" do
|
18
18
|
optional :project_id, :string, 1
|
19
19
|
optional :cluster_name, :string, 2
|
20
20
|
optional :config, :message, 3, "google.cloud.dataproc.v1.ClusterConfig"
|
21
|
+
optional :virtual_cluster_config, :message, 10, "google.cloud.dataproc.v1.VirtualClusterConfig"
|
21
22
|
map :labels, :string, :string, 8
|
22
23
|
optional :status, :message, 4, "google.cloud.dataproc.v1.ClusterStatus"
|
23
24
|
repeated :status_history, :message, 7, "google.cloud.dataproc.v1.ClusterStatus"
|
@@ -39,14 +40,18 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
39
40
|
optional :lifecycle_config, :message, 17, "google.cloud.dataproc.v1.LifecycleConfig"
|
40
41
|
optional :endpoint_config, :message, 19, "google.cloud.dataproc.v1.EndpointConfig"
|
41
42
|
optional :metastore_config, :message, 20, "google.cloud.dataproc.v1.MetastoreConfig"
|
42
|
-
optional :gke_cluster_config, :message, 21, "google.cloud.dataproc.v1.GkeClusterConfig"
|
43
43
|
end
|
44
|
-
add_message "google.cloud.dataproc.v1.
|
45
|
-
optional :
|
44
|
+
add_message "google.cloud.dataproc.v1.VirtualClusterConfig" do
|
45
|
+
optional :staging_bucket, :string, 1
|
46
|
+
optional :temp_bucket, :string, 2
|
47
|
+
optional :auxiliary_services_config, :message, 7, "google.cloud.dataproc.v1.AuxiliaryServicesConfig"
|
48
|
+
oneof :infrastructure_config do
|
49
|
+
optional :kubernetes_cluster_config, :message, 6, "google.cloud.dataproc.v1.KubernetesClusterConfig"
|
50
|
+
end
|
46
51
|
end
|
47
|
-
add_message "google.cloud.dataproc.v1.
|
48
|
-
optional :
|
49
|
-
optional :
|
52
|
+
add_message "google.cloud.dataproc.v1.AuxiliaryServicesConfig" do
|
53
|
+
optional :metastore_config, :message, 1, "google.cloud.dataproc.v1.MetastoreConfig"
|
54
|
+
optional :spark_history_server_config, :message, 2, "google.cloud.dataproc.v1.SparkHistoryServerConfig"
|
50
55
|
end
|
51
56
|
add_message "google.cloud.dataproc.v1.EndpointConfig" do
|
52
57
|
map :http_ports, :string, :string, 1
|
@@ -71,6 +76,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
71
76
|
optional :reservation_affinity, :message, 11, "google.cloud.dataproc.v1.ReservationAffinity"
|
72
77
|
optional :node_group_affinity, :message, 13, "google.cloud.dataproc.v1.NodeGroupAffinity"
|
73
78
|
optional :shielded_instance_config, :message, 14, "google.cloud.dataproc.v1.ShieldedInstanceConfig"
|
79
|
+
optional :confidential_instance_config, :message, 15, "google.cloud.dataproc.v1.ConfidentialInstanceConfig"
|
74
80
|
end
|
75
81
|
add_enum "google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess" do
|
76
82
|
value :PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED, 0
|
@@ -86,6 +92,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
86
92
|
optional :enable_vtpm, :bool, 2
|
87
93
|
optional :enable_integrity_monitoring, :bool, 3
|
88
94
|
end
|
95
|
+
add_message "google.cloud.dataproc.v1.ConfidentialInstanceConfig" do
|
96
|
+
optional :enable_confidential_compute, :bool, 1
|
97
|
+
end
|
89
98
|
add_message "google.cloud.dataproc.v1.InstanceGroupConfig" do
|
90
99
|
optional :num_instances, :int32, 1
|
91
100
|
repeated :instance_names, :string, 2
|
@@ -115,6 +124,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
115
124
|
optional :boot_disk_type, :string, 3
|
116
125
|
optional :boot_disk_size_gb, :int32, 1
|
117
126
|
optional :num_local_ssds, :int32, 2
|
127
|
+
optional :local_ssd_interface, :string, 4
|
118
128
|
end
|
119
129
|
add_message "google.cloud.dataproc.v1.NodeInitializationAction" do
|
120
130
|
optional :executable_file, :string, 1
|
@@ -131,6 +141,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
131
141
|
value :CREATING, 1
|
132
142
|
value :RUNNING, 2
|
133
143
|
value :ERROR, 3
|
144
|
+
value :ERROR_DUE_TO_UPDATE, 9
|
134
145
|
value :DELETING, 4
|
135
146
|
value :UPDATING, 5
|
136
147
|
value :STOPPING, 6
|
@@ -191,6 +202,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
191
202
|
optional :region, :string, 3
|
192
203
|
optional :cluster, :message, 2, "google.cloud.dataproc.v1.Cluster"
|
193
204
|
optional :request_id, :string, 4
|
205
|
+
optional :action_on_failed_primary_workers, :enum, 5, "google.cloud.dataproc.v1.FailureAction"
|
194
206
|
end
|
195
207
|
add_message "google.cloud.dataproc.v1.UpdateClusterRequest" do
|
196
208
|
optional :project_id, :string, 1
|
@@ -266,8 +278,8 @@ module Google
|
|
266
278
|
module V1
|
267
279
|
Cluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.Cluster").msgclass
|
268
280
|
ClusterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ClusterConfig").msgclass
|
269
|
-
|
270
|
-
|
281
|
+
VirtualClusterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.VirtualClusterConfig").msgclass
|
282
|
+
AuxiliaryServicesConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.AuxiliaryServicesConfig").msgclass
|
271
283
|
EndpointConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.EndpointConfig").msgclass
|
272
284
|
AutoscalingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.AutoscalingConfig").msgclass
|
273
285
|
EncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.EncryptionConfig").msgclass
|
@@ -275,6 +287,7 @@ module Google
|
|
275
287
|
GceClusterConfig::PrivateIpv6GoogleAccess = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess").enummodule
|
276
288
|
NodeGroupAffinity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.NodeGroupAffinity").msgclass
|
277
289
|
ShieldedInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ShieldedInstanceConfig").msgclass
|
290
|
+
ConfidentialInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ConfidentialInstanceConfig").msgclass
|
278
291
|
InstanceGroupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.InstanceGroupConfig").msgclass
|
279
292
|
InstanceGroupConfig::Preemptibility = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility").enummodule
|
280
293
|
ManagedGroupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ManagedGroupConfig").msgclass
|
@@ -28,7 +28,7 @@ module Google
|
|
28
28
|
# of Compute Engine instances.
|
29
29
|
class Service
|
30
30
|
|
31
|
-
include GRPC::GenericService
|
31
|
+
include ::GRPC::GenericService
|
32
32
|
|
33
33
|
self.marshal_class_method = :encode
|
34
34
|
self.unmarshal_class_method = :decode
|
@@ -41,6 +41,8 @@ module Google
|
|
41
41
|
# Updates a cluster in a project. The returned
|
42
42
|
# [Operation.metadata][google.longrunning.Operation.metadata] will be
|
43
43
|
# [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
|
44
|
+
# The cluster must be in a [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an error
|
45
|
+
# is returned.
|
44
46
|
rpc :UpdateCluster, ::Google::Cloud::Dataproc::V1::UpdateClusterRequest, ::Google::Longrunning::Operation
|
45
47
|
# Stops a cluster in a project.
|
46
48
|
rpc :StopCluster, ::Google::Cloud::Dataproc::V1::StopClusterRequest, ::Google::Longrunning::Operation
|
@@ -168,6 +168,7 @@ module Google
|
|
168
168
|
|
169
169
|
@operations_client = Operations.new do |config|
|
170
170
|
config.credentials = credentials
|
171
|
+
config.quota_project = @quota_project_id
|
171
172
|
config.endpoint = @config.endpoint
|
172
173
|
end
|
173
174
|
|
@@ -236,6 +237,21 @@ module Google
|
|
236
237
|
#
|
237
238
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
238
239
|
#
|
240
|
+
# @example Basic example
|
241
|
+
# require "google/cloud/dataproc/v1"
|
242
|
+
#
|
243
|
+
# # Create a client object. The client can be reused for multiple calls.
|
244
|
+
# client = Google::Cloud::Dataproc::V1::JobController::Client.new
|
245
|
+
#
|
246
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
247
|
+
# request = Google::Cloud::Dataproc::V1::SubmitJobRequest.new
|
248
|
+
#
|
249
|
+
# # Call the submit_job method.
|
250
|
+
# result = client.submit_job request
|
251
|
+
#
|
252
|
+
# # The returned object is of type Google::Cloud::Dataproc::V1::Job.
|
253
|
+
# p result
|
254
|
+
#
|
239
255
|
def submit_job request, options = nil
|
240
256
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
241
257
|
|
@@ -253,10 +269,14 @@ module Google
|
|
253
269
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
254
270
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
255
271
|
|
256
|
-
header_params = {
|
257
|
-
|
258
|
-
"
|
259
|
-
|
272
|
+
header_params = {}
|
273
|
+
if request.project_id
|
274
|
+
header_params["project_id"] = request.project_id
|
275
|
+
end
|
276
|
+
if request.region
|
277
|
+
header_params["region"] = request.region
|
278
|
+
end
|
279
|
+
|
260
280
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
261
281
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
262
282
|
|
@@ -323,6 +343,28 @@ module Google
|
|
323
343
|
#
|
324
344
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
325
345
|
#
|
346
|
+
# @example Basic example
|
347
|
+
# require "google/cloud/dataproc/v1"
|
348
|
+
#
|
349
|
+
# # Create a client object. The client can be reused for multiple calls.
|
350
|
+
# client = Google::Cloud::Dataproc::V1::JobController::Client.new
|
351
|
+
#
|
352
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
353
|
+
# request = Google::Cloud::Dataproc::V1::SubmitJobRequest.new
|
354
|
+
#
|
355
|
+
# # Call the submit_job_as_operation method.
|
356
|
+
# result = client.submit_job_as_operation request
|
357
|
+
#
|
358
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
359
|
+
# # object to check the status of an operation, cancel it, or wait
|
360
|
+
# # for results. Here is how to block until completion:
|
361
|
+
# result.wait_until_done! timeout: 60
|
362
|
+
# if result.response?
|
363
|
+
# p result.response
|
364
|
+
# else
|
365
|
+
# puts "Error!"
|
366
|
+
# end
|
367
|
+
#
|
326
368
|
def submit_job_as_operation request, options = nil
|
327
369
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
328
370
|
|
@@ -340,10 +382,14 @@ module Google
|
|
340
382
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
341
383
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
342
384
|
|
343
|
-
header_params = {
|
344
|
-
|
345
|
-
"
|
346
|
-
|
385
|
+
header_params = {}
|
386
|
+
if request.project_id
|
387
|
+
header_params["project_id"] = request.project_id
|
388
|
+
end
|
389
|
+
if request.region
|
390
|
+
header_params["region"] = request.region
|
391
|
+
end
|
392
|
+
|
347
393
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
348
394
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
349
395
|
|
@@ -398,6 +444,21 @@ module Google
|
|
398
444
|
#
|
399
445
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
400
446
|
#
|
447
|
+
# @example Basic example
|
448
|
+
# require "google/cloud/dataproc/v1"
|
449
|
+
#
|
450
|
+
# # Create a client object. The client can be reused for multiple calls.
|
451
|
+
# client = Google::Cloud::Dataproc::V1::JobController::Client.new
|
452
|
+
#
|
453
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
454
|
+
# request = Google::Cloud::Dataproc::V1::GetJobRequest.new
|
455
|
+
#
|
456
|
+
# # Call the get_job method.
|
457
|
+
# result = client.get_job request
|
458
|
+
#
|
459
|
+
# # The returned object is of type Google::Cloud::Dataproc::V1::Job.
|
460
|
+
# p result
|
461
|
+
#
|
401
462
|
def get_job request, options = nil
|
402
463
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
403
464
|
|
@@ -415,11 +476,17 @@ module Google
|
|
415
476
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
416
477
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
417
478
|
|
418
|
-
header_params = {
|
419
|
-
|
420
|
-
"
|
421
|
-
|
422
|
-
|
479
|
+
header_params = {}
|
480
|
+
if request.project_id
|
481
|
+
header_params["project_id"] = request.project_id
|
482
|
+
end
|
483
|
+
if request.region
|
484
|
+
header_params["region"] = request.region
|
485
|
+
end
|
486
|
+
if request.job_id
|
487
|
+
header_params["job_id"] = request.job_id
|
488
|
+
end
|
489
|
+
|
423
490
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
424
491
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
425
492
|
|
@@ -499,6 +566,27 @@ module Google
|
|
499
566
|
#
|
500
567
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
501
568
|
#
|
569
|
+
# @example Basic example
|
570
|
+
# require "google/cloud/dataproc/v1"
|
571
|
+
#
|
572
|
+
# # Create a client object. The client can be reused for multiple calls.
|
573
|
+
# client = Google::Cloud::Dataproc::V1::JobController::Client.new
|
574
|
+
#
|
575
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
576
|
+
# request = Google::Cloud::Dataproc::V1::ListJobsRequest.new
|
577
|
+
#
|
578
|
+
# # Call the list_jobs method.
|
579
|
+
# result = client.list_jobs request
|
580
|
+
#
|
581
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
582
|
+
# # iterate over all elements by calling #each, and the enumerable
|
583
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
584
|
+
# # methods are also available for managing paging directly.
|
585
|
+
# result.each do |response|
|
586
|
+
# # Each element is of type ::Google::Cloud::Dataproc::V1::Job.
|
587
|
+
# p response
|
588
|
+
# end
|
589
|
+
#
|
502
590
|
def list_jobs request, options = nil
|
503
591
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
504
592
|
|
@@ -516,10 +604,14 @@ module Google
|
|
516
604
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
517
605
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
518
606
|
|
519
|
-
header_params = {
|
520
|
-
|
521
|
-
"
|
522
|
-
|
607
|
+
header_params = {}
|
608
|
+
if request.project_id
|
609
|
+
header_params["project_id"] = request.project_id
|
610
|
+
end
|
611
|
+
if request.region
|
612
|
+
header_params["region"] = request.region
|
613
|
+
end
|
614
|
+
|
523
615
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
524
616
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
525
617
|
|
@@ -583,6 +675,21 @@ module Google
|
|
583
675
|
#
|
584
676
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
585
677
|
#
|
678
|
+
# @example Basic example
|
679
|
+
# require "google/cloud/dataproc/v1"
|
680
|
+
#
|
681
|
+
# # Create a client object. The client can be reused for multiple calls.
|
682
|
+
# client = Google::Cloud::Dataproc::V1::JobController::Client.new
|
683
|
+
#
|
684
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
685
|
+
# request = Google::Cloud::Dataproc::V1::UpdateJobRequest.new
|
686
|
+
#
|
687
|
+
# # Call the update_job method.
|
688
|
+
# result = client.update_job request
|
689
|
+
#
|
690
|
+
# # The returned object is of type Google::Cloud::Dataproc::V1::Job.
|
691
|
+
# p result
|
692
|
+
#
|
586
693
|
def update_job request, options = nil
|
587
694
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
588
695
|
|
@@ -600,11 +707,17 @@ module Google
|
|
600
707
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
601
708
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
602
709
|
|
603
|
-
header_params = {
|
604
|
-
|
605
|
-
"
|
606
|
-
|
607
|
-
|
710
|
+
header_params = {}
|
711
|
+
if request.project_id
|
712
|
+
header_params["project_id"] = request.project_id
|
713
|
+
end
|
714
|
+
if request.region
|
715
|
+
header_params["region"] = request.region
|
716
|
+
end
|
717
|
+
if request.job_id
|
718
|
+
header_params["job_id"] = request.job_id
|
719
|
+
end
|
720
|
+
|
608
721
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
609
722
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
610
723
|
|
@@ -662,6 +775,21 @@ module Google
|
|
662
775
|
#
|
663
776
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
664
777
|
#
|
778
|
+
# @example Basic example
|
779
|
+
# require "google/cloud/dataproc/v1"
|
780
|
+
#
|
781
|
+
# # Create a client object. The client can be reused for multiple calls.
|
782
|
+
# client = Google::Cloud::Dataproc::V1::JobController::Client.new
|
783
|
+
#
|
784
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
785
|
+
# request = Google::Cloud::Dataproc::V1::CancelJobRequest.new
|
786
|
+
#
|
787
|
+
# # Call the cancel_job method.
|
788
|
+
# result = client.cancel_job request
|
789
|
+
#
|
790
|
+
# # The returned object is of type Google::Cloud::Dataproc::V1::Job.
|
791
|
+
# p result
|
792
|
+
#
|
665
793
|
def cancel_job request, options = nil
|
666
794
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
667
795
|
|
@@ -679,11 +807,17 @@ module Google
|
|
679
807
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
680
808
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
681
809
|
|
682
|
-
header_params = {
|
683
|
-
|
684
|
-
"
|
685
|
-
|
686
|
-
|
810
|
+
header_params = {}
|
811
|
+
if request.project_id
|
812
|
+
header_params["project_id"] = request.project_id
|
813
|
+
end
|
814
|
+
if request.region
|
815
|
+
header_params["region"] = request.region
|
816
|
+
end
|
817
|
+
if request.job_id
|
818
|
+
header_params["job_id"] = request.job_id
|
819
|
+
end
|
820
|
+
|
687
821
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
688
822
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
689
823
|
|
@@ -738,6 +872,21 @@ module Google
|
|
738
872
|
#
|
739
873
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
740
874
|
#
|
875
|
+
# @example Basic example
|
876
|
+
# require "google/cloud/dataproc/v1"
|
877
|
+
#
|
878
|
+
# # Create a client object. The client can be reused for multiple calls.
|
879
|
+
# client = Google::Cloud::Dataproc::V1::JobController::Client.new
|
880
|
+
#
|
881
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
882
|
+
# request = Google::Cloud::Dataproc::V1::DeleteJobRequest.new
|
883
|
+
#
|
884
|
+
# # Call the delete_job method.
|
885
|
+
# result = client.delete_job request
|
886
|
+
#
|
887
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
888
|
+
# p result
|
889
|
+
#
|
741
890
|
def delete_job request, options = nil
|
742
891
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
743
892
|
|
@@ -755,11 +904,17 @@ module Google
|
|
755
904
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
756
905
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
757
906
|
|
758
|
-
header_params = {
|
759
|
-
|
760
|
-
"
|
761
|
-
|
762
|
-
|
907
|
+
header_params = {}
|
908
|
+
if request.project_id
|
909
|
+
header_params["project_id"] = request.project_id
|
910
|
+
end
|
911
|
+
if request.region
|
912
|
+
header_params["region"] = request.region
|
913
|
+
end
|
914
|
+
if request.job_id
|
915
|
+
header_params["job_id"] = request.job_id
|
916
|
+
end
|
917
|
+
|
763
918
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
764
919
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
765
920
|
|