google-cloud-dataproc-v1 0.6.0 → 0.7.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/AUTHENTICATION.md +8 -8
- 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 +48 -54
- data/lib/google/cloud/dataproc/v1/batch_controller/client.rb +637 -0
- data/lib/google/cloud/dataproc/v1/batch_controller/credentials.rb +51 -0
- data/lib/google/cloud/dataproc/v1/batch_controller/operations.rb +664 -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 +75 -80
- data/lib/google/cloud/dataproc/v1/cluster_controller/operations.rb +34 -25
- data/lib/google/cloud/dataproc/v1/clusters_pb.rb +9 -2
- data/lib/google/cloud/dataproc/v1/clusters_services_pb.rb +3 -1
- data/lib/google/cloud/dataproc/v1/job_controller/client.rb +58 -72
- data/lib/google/cloud/dataproc/v1/job_controller/operations.rb +34 -25
- 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 +40 -2
- data/lib/google/cloud/dataproc/v1/version.rb +1 -1
- data/lib/google/cloud/dataproc/v1/workflow_template_service/client.rb +59 -74
- data/lib/google/cloud/dataproc/v1/workflow_template_service/operations.rb +34 -25
- 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/field_behavior.rb +7 -1
- 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 +45 -22
- data/proto_docs/google/cloud/dataproc/v1/jobs.rb +8 -9
- data/proto_docs/google/cloud/dataproc/v1/operations.rb +48 -0
- data/proto_docs/google/cloud/dataproc/v1/shared.rb +117 -1
- data/proto_docs/google/cloud/dataproc/v1/workflow_templates.rb +11 -14
- metadata +21 -7
@@ -82,7 +82,7 @@ module Google
|
|
82
82
|
# Create credentials
|
83
83
|
credentials = @config.credentials
|
84
84
|
credentials ||= Credentials.default scope: @config.scope
|
85
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
85
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
86
86
|
credentials = Credentials.new credentials, scope: @config.scope
|
87
87
|
end
|
88
88
|
@quota_project_id = @config.quota_project
|
@@ -169,7 +169,9 @@ module Google
|
|
169
169
|
options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
|
170
170
|
metadata: metadata,
|
171
171
|
retry_policy: @config.rpcs.list_operations.retry_policy
|
172
|
-
|
172
|
+
|
173
|
+
options.apply_defaults timeout: @config.timeout,
|
174
|
+
metadata: @config.metadata,
|
173
175
|
retry_policy: @config.retry_policy
|
174
176
|
|
175
177
|
@operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
|
@@ -239,7 +241,9 @@ module Google
|
|
239
241
|
options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
|
240
242
|
metadata: metadata,
|
241
243
|
retry_policy: @config.rpcs.get_operation.retry_policy
|
242
|
-
|
244
|
+
|
245
|
+
options.apply_defaults timeout: @config.timeout,
|
246
|
+
metadata: @config.metadata,
|
243
247
|
retry_policy: @config.retry_policy
|
244
248
|
|
245
249
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
@@ -309,7 +313,9 @@ module Google
|
|
309
313
|
options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
|
310
314
|
metadata: metadata,
|
311
315
|
retry_policy: @config.rpcs.delete_operation.retry_policy
|
312
|
-
|
316
|
+
|
317
|
+
options.apply_defaults timeout: @config.timeout,
|
318
|
+
metadata: @config.metadata,
|
313
319
|
retry_policy: @config.retry_policy
|
314
320
|
|
315
321
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
@@ -384,7 +390,9 @@ module Google
|
|
384
390
|
options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
|
385
391
|
metadata: metadata,
|
386
392
|
retry_policy: @config.rpcs.cancel_operation.retry_policy
|
387
|
-
|
393
|
+
|
394
|
+
options.apply_defaults timeout: @config.timeout,
|
395
|
+
metadata: @config.metadata,
|
388
396
|
retry_policy: @config.retry_policy
|
389
397
|
|
390
398
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
@@ -396,9 +404,9 @@ module Google
|
|
396
404
|
end
|
397
405
|
|
398
406
|
##
|
399
|
-
# Waits
|
400
|
-
#
|
401
|
-
#
|
407
|
+
# Waits until the specified long-running operation is done or reaches at most
|
408
|
+
# a specified timeout, returning the latest state. If the operation is
|
409
|
+
# already done, the latest state is immediately returned. If the timeout
|
402
410
|
# specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
|
403
411
|
# timeout is used. If the server does not support this method, it returns
|
404
412
|
# `google.rpc.Code.UNIMPLEMENTED`.
|
@@ -456,7 +464,9 @@ module Google
|
|
456
464
|
options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
|
457
465
|
metadata: metadata,
|
458
466
|
retry_policy: @config.rpcs.wait_operation.retry_policy
|
459
|
-
|
467
|
+
|
468
|
+
options.apply_defaults timeout: @config.timeout,
|
469
|
+
metadata: @config.metadata,
|
460
470
|
retry_policy: @config.retry_policy
|
461
471
|
|
462
472
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
@@ -481,22 +491,21 @@ module Google
|
|
481
491
|
# Configuration can be applied globally to all clients, or to a single client
|
482
492
|
# on construction.
|
483
493
|
#
|
484
|
-
#
|
485
|
-
#
|
486
|
-
#
|
487
|
-
# to 20 seconds,
|
488
|
-
#
|
489
|
-
#
|
490
|
-
#
|
491
|
-
#
|
492
|
-
#
|
493
|
-
#
|
494
|
-
#
|
495
|
-
#
|
496
|
-
#
|
497
|
-
#
|
498
|
-
#
|
499
|
-
# end
|
494
|
+
# @example
|
495
|
+
#
|
496
|
+
# # Modify the global config, setting the timeout for
|
497
|
+
# # list_operations to 20 seconds,
|
498
|
+
# # and all remaining timeouts to 10 seconds.
|
499
|
+
# ::Google::Longrunning::Operations::Client.configure do |config|
|
500
|
+
# config.timeout = 10.0
|
501
|
+
# config.rpcs.list_operations.timeout = 20.0
|
502
|
+
# end
|
503
|
+
#
|
504
|
+
# # Apply the above configuration only to a new client.
|
505
|
+
# client = ::Google::Longrunning::Operations::Client.new do |config|
|
506
|
+
# config.timeout = 10.0
|
507
|
+
# config.rpcs.list_operations.timeout = 20.0
|
508
|
+
# end
|
500
509
|
#
|
501
510
|
# @!attribute [rw] endpoint
|
502
511
|
# The hostname or hostname:port of the service endpoint.
|
@@ -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,6 +10,8 @@ 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
|
@@ -71,6 +71,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
71
71
|
optional :reservation_affinity, :message, 11, "google.cloud.dataproc.v1.ReservationAffinity"
|
72
72
|
optional :node_group_affinity, :message, 13, "google.cloud.dataproc.v1.NodeGroupAffinity"
|
73
73
|
optional :shielded_instance_config, :message, 14, "google.cloud.dataproc.v1.ShieldedInstanceConfig"
|
74
|
+
optional :confidential_instance_config, :message, 15, "google.cloud.dataproc.v1.ConfidentialInstanceConfig"
|
74
75
|
end
|
75
76
|
add_enum "google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess" do
|
76
77
|
value :PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED, 0
|
@@ -86,6 +87,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
86
87
|
optional :enable_vtpm, :bool, 2
|
87
88
|
optional :enable_integrity_monitoring, :bool, 3
|
88
89
|
end
|
90
|
+
add_message "google.cloud.dataproc.v1.ConfidentialInstanceConfig" do
|
91
|
+
optional :enable_confidential_compute, :bool, 1
|
92
|
+
end
|
89
93
|
add_message "google.cloud.dataproc.v1.InstanceGroupConfig" do
|
90
94
|
optional :num_instances, :int32, 1
|
91
95
|
repeated :instance_names, :string, 2
|
@@ -131,6 +135,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
131
135
|
value :CREATING, 1
|
132
136
|
value :RUNNING, 2
|
133
137
|
value :ERROR, 3
|
138
|
+
value :ERROR_DUE_TO_UPDATE, 9
|
134
139
|
value :DELETING, 4
|
135
140
|
value :UPDATING, 5
|
136
141
|
value :STOPPING, 6
|
@@ -191,6 +196,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
191
196
|
optional :region, :string, 3
|
192
197
|
optional :cluster, :message, 2, "google.cloud.dataproc.v1.Cluster"
|
193
198
|
optional :request_id, :string, 4
|
199
|
+
optional :action_on_failed_primary_workers, :enum, 5, "google.cloud.dataproc.v1.FailureAction"
|
194
200
|
end
|
195
201
|
add_message "google.cloud.dataproc.v1.UpdateClusterRequest" do
|
196
202
|
optional :project_id, :string, 1
|
@@ -275,6 +281,7 @@ module Google
|
|
275
281
|
GceClusterConfig::PrivateIpv6GoogleAccess = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess").enummodule
|
276
282
|
NodeGroupAffinity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.NodeGroupAffinity").msgclass
|
277
283
|
ShieldedInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ShieldedInstanceConfig").msgclass
|
284
|
+
ConfidentialInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ConfidentialInstanceConfig").msgclass
|
278
285
|
InstanceGroupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.InstanceGroupConfig").msgclass
|
279
286
|
InstanceGroupConfig::Preemptibility = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility").enummodule
|
280
287
|
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
|
@@ -39,13 +39,12 @@ module Google
|
|
39
39
|
# See {::Google::Cloud::Dataproc::V1::JobController::Client::Configuration}
|
40
40
|
# for a description of the configuration fields.
|
41
41
|
#
|
42
|
-
#
|
42
|
+
# @example
|
43
43
|
#
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
# end
|
44
|
+
# # Modify the configuration for all JobController clients
|
45
|
+
# ::Google::Cloud::Dataproc::V1::JobController::Client.configure do |config|
|
46
|
+
# config.timeout = 10.0
|
47
|
+
# end
|
49
48
|
#
|
50
49
|
# @yield [config] Configure the Client client.
|
51
50
|
# @yieldparam config [Client::Configuration]
|
@@ -65,58 +64,37 @@ module Google
|
|
65
64
|
|
66
65
|
default_config.rpcs.submit_job.timeout = 900.0
|
67
66
|
default_config.rpcs.submit_job.retry_policy = {
|
68
|
-
initial_delay: 0.1,
|
69
|
-
max_delay: 60.0,
|
70
|
-
multiplier: 1.3,
|
71
|
-
retry_codes: [14]
|
67
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
72
68
|
}
|
73
69
|
|
74
70
|
default_config.rpcs.submit_job_as_operation.timeout = 900.0
|
75
71
|
default_config.rpcs.submit_job_as_operation.retry_policy = {
|
76
|
-
initial_delay: 0.1,
|
77
|
-
max_delay: 60.0,
|
78
|
-
multiplier: 1.3,
|
79
|
-
retry_codes: [14]
|
72
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
80
73
|
}
|
81
74
|
|
82
75
|
default_config.rpcs.get_job.timeout = 900.0
|
83
76
|
default_config.rpcs.get_job.retry_policy = {
|
84
|
-
initial_delay: 0.1,
|
85
|
-
max_delay: 60.0,
|
86
|
-
multiplier: 1.3,
|
87
|
-
retry_codes: [4, 13, 14]
|
77
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
|
88
78
|
}
|
89
79
|
|
90
80
|
default_config.rpcs.list_jobs.timeout = 900.0
|
91
81
|
default_config.rpcs.list_jobs.retry_policy = {
|
92
|
-
initial_delay: 0.1,
|
93
|
-
max_delay: 60.0,
|
94
|
-
multiplier: 1.3,
|
95
|
-
retry_codes: [4, 13, 14]
|
82
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
|
96
83
|
}
|
97
84
|
|
98
85
|
default_config.rpcs.update_job.timeout = 900.0
|
99
86
|
default_config.rpcs.update_job.retry_policy = {
|
100
|
-
initial_delay: 0.1,
|
101
|
-
max_delay: 60.0,
|
102
|
-
multiplier: 1.3,
|
103
|
-
retry_codes: [14]
|
87
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
104
88
|
}
|
105
89
|
|
106
90
|
default_config.rpcs.cancel_job.timeout = 900.0
|
107
91
|
default_config.rpcs.cancel_job.retry_policy = {
|
108
|
-
initial_delay: 0.1,
|
109
|
-
max_delay: 60.0,
|
110
|
-
multiplier: 1.3,
|
111
|
-
retry_codes: [4, 13, 14]
|
92
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 13, 14]
|
112
93
|
}
|
113
94
|
|
114
95
|
default_config.rpcs.delete_job.timeout = 900.0
|
115
96
|
default_config.rpcs.delete_job.retry_policy = {
|
116
|
-
initial_delay: 0.1,
|
117
|
-
max_delay: 60.0,
|
118
|
-
multiplier: 1.3,
|
119
|
-
retry_codes: [14]
|
97
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
120
98
|
}
|
121
99
|
|
122
100
|
default_config
|
@@ -148,19 +126,15 @@ module Google
|
|
148
126
|
##
|
149
127
|
# Create a new JobController client object.
|
150
128
|
#
|
151
|
-
#
|
152
|
-
#
|
153
|
-
# To create a new JobController client with the default
|
154
|
-
# configuration:
|
129
|
+
# @example
|
155
130
|
#
|
156
|
-
#
|
131
|
+
# # Create a client using the default configuration
|
132
|
+
# client = ::Google::Cloud::Dataproc::V1::JobController::Client.new
|
157
133
|
#
|
158
|
-
#
|
159
|
-
#
|
160
|
-
#
|
161
|
-
#
|
162
|
-
# config.timeout = 10.0
|
163
|
-
# end
|
134
|
+
# # Create a client using a custom configuration
|
135
|
+
# client = ::Google::Cloud::Dataproc::V1::JobController::Client.new do |config|
|
136
|
+
# config.timeout = 10.0
|
137
|
+
# end
|
164
138
|
#
|
165
139
|
# @yield [config] Configure the JobController client.
|
166
140
|
# @yieldparam config [Client::Configuration]
|
@@ -180,14 +154,13 @@ module Google
|
|
180
154
|
|
181
155
|
# Create credentials
|
182
156
|
credentials = @config.credentials
|
183
|
-
# Use self-signed JWT if the
|
157
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
184
158
|
# but only if the default endpoint does not have a region prefix.
|
185
|
-
enable_self_signed_jwt = @config.
|
186
|
-
@config.endpoint == Client.configure.endpoint &&
|
159
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
187
160
|
!@config.endpoint.split(".").first.include?("-")
|
188
161
|
credentials ||= Credentials.default scope: @config.scope,
|
189
162
|
enable_self_signed_jwt: enable_self_signed_jwt
|
190
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
163
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
191
164
|
credentials = Credentials.new credentials, scope: @config.scope
|
192
165
|
end
|
193
166
|
@quota_project_id = @config.quota_project
|
@@ -290,7 +263,9 @@ module Google
|
|
290
263
|
options.apply_defaults timeout: @config.rpcs.submit_job.timeout,
|
291
264
|
metadata: metadata,
|
292
265
|
retry_policy: @config.rpcs.submit_job.retry_policy
|
293
|
-
|
266
|
+
|
267
|
+
options.apply_defaults timeout: @config.timeout,
|
268
|
+
metadata: @config.metadata,
|
294
269
|
retry_policy: @config.retry_policy
|
295
270
|
|
296
271
|
@job_controller_stub.call_rpc :submit_job, request, options: options do |response, operation|
|
@@ -375,7 +350,9 @@ module Google
|
|
375
350
|
options.apply_defaults timeout: @config.rpcs.submit_job_as_operation.timeout,
|
376
351
|
metadata: metadata,
|
377
352
|
retry_policy: @config.rpcs.submit_job_as_operation.retry_policy
|
378
|
-
|
353
|
+
|
354
|
+
options.apply_defaults timeout: @config.timeout,
|
355
|
+
metadata: @config.metadata,
|
379
356
|
retry_policy: @config.retry_policy
|
380
357
|
|
381
358
|
@job_controller_stub.call_rpc :submit_job_as_operation, request, options: options do |response, operation|
|
@@ -449,7 +426,9 @@ module Google
|
|
449
426
|
options.apply_defaults timeout: @config.rpcs.get_job.timeout,
|
450
427
|
metadata: metadata,
|
451
428
|
retry_policy: @config.rpcs.get_job.retry_policy
|
452
|
-
|
429
|
+
|
430
|
+
options.apply_defaults timeout: @config.timeout,
|
431
|
+
metadata: @config.metadata,
|
453
432
|
retry_policy: @config.retry_policy
|
454
433
|
|
455
434
|
@job_controller_stub.call_rpc :get_job, request, options: options do |response, operation|
|
@@ -547,7 +526,9 @@ module Google
|
|
547
526
|
options.apply_defaults timeout: @config.rpcs.list_jobs.timeout,
|
548
527
|
metadata: metadata,
|
549
528
|
retry_policy: @config.rpcs.list_jobs.retry_policy
|
550
|
-
|
529
|
+
|
530
|
+
options.apply_defaults timeout: @config.timeout,
|
531
|
+
metadata: @config.metadata,
|
551
532
|
retry_policy: @config.retry_policy
|
552
533
|
|
553
534
|
@job_controller_stub.call_rpc :list_jobs, request, options: options do |response, operation|
|
@@ -630,7 +611,9 @@ module Google
|
|
630
611
|
options.apply_defaults timeout: @config.rpcs.update_job.timeout,
|
631
612
|
metadata: metadata,
|
632
613
|
retry_policy: @config.rpcs.update_job.retry_policy
|
633
|
-
|
614
|
+
|
615
|
+
options.apply_defaults timeout: @config.timeout,
|
616
|
+
metadata: @config.metadata,
|
634
617
|
retry_policy: @config.retry_policy
|
635
618
|
|
636
619
|
@job_controller_stub.call_rpc :update_job, request, options: options do |response, operation|
|
@@ -707,7 +690,9 @@ module Google
|
|
707
690
|
options.apply_defaults timeout: @config.rpcs.cancel_job.timeout,
|
708
691
|
metadata: metadata,
|
709
692
|
retry_policy: @config.rpcs.cancel_job.retry_policy
|
710
|
-
|
693
|
+
|
694
|
+
options.apply_defaults timeout: @config.timeout,
|
695
|
+
metadata: @config.metadata,
|
711
696
|
retry_policy: @config.retry_policy
|
712
697
|
|
713
698
|
@job_controller_stub.call_rpc :cancel_job, request, options: options do |response, operation|
|
@@ -781,7 +766,9 @@ module Google
|
|
781
766
|
options.apply_defaults timeout: @config.rpcs.delete_job.timeout,
|
782
767
|
metadata: metadata,
|
783
768
|
retry_policy: @config.rpcs.delete_job.retry_policy
|
784
|
-
|
769
|
+
|
770
|
+
options.apply_defaults timeout: @config.timeout,
|
771
|
+
metadata: @config.metadata,
|
785
772
|
retry_policy: @config.retry_policy
|
786
773
|
|
787
774
|
@job_controller_stub.call_rpc :delete_job, request, options: options do |response, operation|
|
@@ -805,22 +792,21 @@ module Google
|
|
805
792
|
# Configuration can be applied globally to all clients, or to a single client
|
806
793
|
# on construction.
|
807
794
|
#
|
808
|
-
#
|
809
|
-
#
|
810
|
-
#
|
811
|
-
# to 20 seconds,
|
812
|
-
#
|
813
|
-
#
|
814
|
-
#
|
815
|
-
#
|
816
|
-
#
|
817
|
-
#
|
818
|
-
#
|
819
|
-
#
|
820
|
-
#
|
821
|
-
#
|
822
|
-
#
|
823
|
-
# end
|
795
|
+
# @example
|
796
|
+
#
|
797
|
+
# # Modify the global config, setting the timeout for
|
798
|
+
# # submit_job to 20 seconds,
|
799
|
+
# # and all remaining timeouts to 10 seconds.
|
800
|
+
# ::Google::Cloud::Dataproc::V1::JobController::Client.configure do |config|
|
801
|
+
# config.timeout = 10.0
|
802
|
+
# config.rpcs.submit_job.timeout = 20.0
|
803
|
+
# end
|
804
|
+
#
|
805
|
+
# # Apply the above configuration only to a new client.
|
806
|
+
# client = ::Google::Cloud::Dataproc::V1::JobController::Client.new do |config|
|
807
|
+
# config.timeout = 10.0
|
808
|
+
# config.rpcs.submit_job.timeout = 20.0
|
809
|
+
# end
|
824
810
|
#
|
825
811
|
# @!attribute [rw] endpoint
|
826
812
|
# The hostname or hostname:port of the service endpoint.
|
@@ -82,7 +82,7 @@ module Google
|
|
82
82
|
# Create credentials
|
83
83
|
credentials = @config.credentials
|
84
84
|
credentials ||= Credentials.default scope: @config.scope
|
85
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
85
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
86
86
|
credentials = Credentials.new credentials, scope: @config.scope
|
87
87
|
end
|
88
88
|
@quota_project_id = @config.quota_project
|
@@ -169,7 +169,9 @@ module Google
|
|
169
169
|
options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
|
170
170
|
metadata: metadata,
|
171
171
|
retry_policy: @config.rpcs.list_operations.retry_policy
|
172
|
-
|
172
|
+
|
173
|
+
options.apply_defaults timeout: @config.timeout,
|
174
|
+
metadata: @config.metadata,
|
173
175
|
retry_policy: @config.retry_policy
|
174
176
|
|
175
177
|
@operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
|
@@ -239,7 +241,9 @@ module Google
|
|
239
241
|
options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
|
240
242
|
metadata: metadata,
|
241
243
|
retry_policy: @config.rpcs.get_operation.retry_policy
|
242
|
-
|
244
|
+
|
245
|
+
options.apply_defaults timeout: @config.timeout,
|
246
|
+
metadata: @config.metadata,
|
243
247
|
retry_policy: @config.retry_policy
|
244
248
|
|
245
249
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
@@ -309,7 +313,9 @@ module Google
|
|
309
313
|
options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
|
310
314
|
metadata: metadata,
|
311
315
|
retry_policy: @config.rpcs.delete_operation.retry_policy
|
312
|
-
|
316
|
+
|
317
|
+
options.apply_defaults timeout: @config.timeout,
|
318
|
+
metadata: @config.metadata,
|
313
319
|
retry_policy: @config.retry_policy
|
314
320
|
|
315
321
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
@@ -384,7 +390,9 @@ module Google
|
|
384
390
|
options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
|
385
391
|
metadata: metadata,
|
386
392
|
retry_policy: @config.rpcs.cancel_operation.retry_policy
|
387
|
-
|
393
|
+
|
394
|
+
options.apply_defaults timeout: @config.timeout,
|
395
|
+
metadata: @config.metadata,
|
388
396
|
retry_policy: @config.retry_policy
|
389
397
|
|
390
398
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
@@ -396,9 +404,9 @@ module Google
|
|
396
404
|
end
|
397
405
|
|
398
406
|
##
|
399
|
-
# Waits
|
400
|
-
#
|
401
|
-
#
|
407
|
+
# Waits until the specified long-running operation is done or reaches at most
|
408
|
+
# a specified timeout, returning the latest state. If the operation is
|
409
|
+
# already done, the latest state is immediately returned. If the timeout
|
402
410
|
# specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
|
403
411
|
# timeout is used. If the server does not support this method, it returns
|
404
412
|
# `google.rpc.Code.UNIMPLEMENTED`.
|
@@ -456,7 +464,9 @@ module Google
|
|
456
464
|
options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
|
457
465
|
metadata: metadata,
|
458
466
|
retry_policy: @config.rpcs.wait_operation.retry_policy
|
459
|
-
|
467
|
+
|
468
|
+
options.apply_defaults timeout: @config.timeout,
|
469
|
+
metadata: @config.metadata,
|
460
470
|
retry_policy: @config.retry_policy
|
461
471
|
|
462
472
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
@@ -481,22 +491,21 @@ module Google
|
|
481
491
|
# Configuration can be applied globally to all clients, or to a single client
|
482
492
|
# on construction.
|
483
493
|
#
|
484
|
-
#
|
485
|
-
#
|
486
|
-
#
|
487
|
-
# to 20 seconds,
|
488
|
-
#
|
489
|
-
#
|
490
|
-
#
|
491
|
-
#
|
492
|
-
#
|
493
|
-
#
|
494
|
-
#
|
495
|
-
#
|
496
|
-
#
|
497
|
-
#
|
498
|
-
#
|
499
|
-
# end
|
494
|
+
# @example
|
495
|
+
#
|
496
|
+
# # Modify the global config, setting the timeout for
|
497
|
+
# # list_operations to 20 seconds,
|
498
|
+
# # and all remaining timeouts to 10 seconds.
|
499
|
+
# ::Google::Longrunning::Operations::Client.configure do |config|
|
500
|
+
# config.timeout = 10.0
|
501
|
+
# config.rpcs.list_operations.timeout = 20.0
|
502
|
+
# end
|
503
|
+
#
|
504
|
+
# # Apply the above configuration only to a new client.
|
505
|
+
# client = ::Google::Longrunning::Operations::Client.new do |config|
|
506
|
+
# config.timeout = 10.0
|
507
|
+
# config.rpcs.list_operations.timeout = 20.0
|
508
|
+
# end
|
500
509
|
#
|
501
510
|
# @!attribute [rw] endpoint
|
502
511
|
# The hostname or hostname:port of the service endpoint.
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/dataproc/v1/jobs.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'
|
@@ -10,6 +8,8 @@ require 'google/longrunning/operations_pb'
|
|
10
8
|
require 'google/protobuf/empty_pb'
|
11
9
|
require 'google/protobuf/field_mask_pb'
|
12
10
|
require 'google/protobuf/timestamp_pb'
|
11
|
+
require 'google/protobuf'
|
12
|
+
|
13
13
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
14
14
|
add_file("google/cloud/dataproc/v1/jobs.proto", :syntax => :proto3) do
|
15
15
|
add_message "google.cloud.dataproc.v1.LoggingConfig" do
|
@@ -1,13 +1,26 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/dataproc/v1/operations.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/field_behavior_pb'
|
7
5
|
require 'google/protobuf/timestamp_pb'
|
8
|
-
require 'google/
|
6
|
+
require 'google/protobuf'
|
7
|
+
|
9
8
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
10
9
|
add_file("google/cloud/dataproc/v1/operations.proto", :syntax => :proto3) do
|
10
|
+
add_message "google.cloud.dataproc.v1.BatchOperationMetadata" do
|
11
|
+
optional :batch, :string, 1
|
12
|
+
optional :batch_uuid, :string, 2
|
13
|
+
optional :create_time, :message, 3, "google.protobuf.Timestamp"
|
14
|
+
optional :done_time, :message, 4, "google.protobuf.Timestamp"
|
15
|
+
optional :operation_type, :enum, 6, "google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType"
|
16
|
+
optional :description, :string, 7
|
17
|
+
map :labels, :string, :string, 8
|
18
|
+
repeated :warnings, :string, 9
|
19
|
+
end
|
20
|
+
add_enum "google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType" do
|
21
|
+
value :BATCH_OPERATION_TYPE_UNSPECIFIED, 0
|
22
|
+
value :BATCH, 1
|
23
|
+
end
|
11
24
|
add_message "google.cloud.dataproc.v1.ClusterOperationStatus" do
|
12
25
|
optional :state, :enum, 1, "google.cloud.dataproc.v1.ClusterOperationStatus.State"
|
13
26
|
optional :inner_state, :string, 2
|
@@ -37,6 +50,8 @@ module Google
|
|
37
50
|
module Cloud
|
38
51
|
module Dataproc
|
39
52
|
module V1
|
53
|
+
BatchOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.BatchOperationMetadata").msgclass
|
54
|
+
BatchOperationMetadata::BatchOperationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType").enummodule
|
40
55
|
ClusterOperationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ClusterOperationStatus").msgclass
|
41
56
|
ClusterOperationStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ClusterOperationStatus.State").enummodule
|
42
57
|
ClusterOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ClusterOperationMetadata").msgclass
|