google-cloud-dataproc-v1 0.5.0 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/client.rb +48 -54
- data/lib/google/cloud/dataproc/v1/cluster_controller.rb +1 -0
- data/lib/google/cloud/dataproc/v1/cluster_controller/client.rb +261 -72
- data/lib/google/cloud/dataproc/v1/cluster_controller/operations.rb +34 -25
- data/lib/google/cloud/dataproc/v1/cluster_controller/paths.rb +71 -0
- data/lib/google/cloud/dataproc/v1/clusters_pb.rb +60 -0
- data/lib/google/cloud/dataproc/v1/clusters_services_pb.rb +4 -0
- data/lib/google/cloud/dataproc/v1/job_controller/client.rb +64 -76
- data/lib/google/cloud/dataproc/v1/job_controller/operations.rb +34 -25
- data/lib/google/cloud/dataproc/v1/jobs_pb.rb +2 -0
- data/lib/google/cloud/dataproc/v1/shared_pb.rb +7 -0
- data/lib/google/cloud/dataproc/v1/version.rb +1 -1
- data/lib/google/cloud/dataproc/v1/workflow_template_service/client.rb +61 -74
- data/lib/google/cloud/dataproc/v1/workflow_template_service/operations.rb +34 -25
- data/lib/google/cloud/dataproc/v1/workflow_template_service/paths.rb +38 -0
- data/lib/google/cloud/dataproc/v1/workflow_templates_pb.rb +5 -0
- data/lib/google/cloud/dataproc/v1/workflow_templates_services_pb.rb +2 -1
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/cloud/dataproc/v1/clusters.rb +240 -16
- data/proto_docs/google/cloud/dataproc/v1/jobs.rb +29 -10
- data/proto_docs/google/cloud/dataproc/v1/shared.rb +24 -1
- data/proto_docs/google/cloud/dataproc/v1/workflow_templates.rb +34 -7
- metadata +14 -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.
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Dataproc
|
23
|
+
module V1
|
24
|
+
module ClusterController
|
25
|
+
# Path helper methods for the ClusterController API.
|
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
|
+
##
|
47
|
+
# Create a fully-qualified Service resource string.
|
48
|
+
#
|
49
|
+
# The resource will be in the following format:
|
50
|
+
#
|
51
|
+
# `projects/{project}/locations/{location}/services/{service}`
|
52
|
+
#
|
53
|
+
# @param project [String]
|
54
|
+
# @param location [String]
|
55
|
+
# @param service [String]
|
56
|
+
#
|
57
|
+
# @return [::String]
|
58
|
+
def service_path project:, location:, service:
|
59
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
60
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
61
|
+
|
62
|
+
"projects/#{project}/locations/#{location}/services/#{service}"
|
63
|
+
end
|
64
|
+
|
65
|
+
extend self
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -6,6 +6,7 @@ require 'google/protobuf'
|
|
6
6
|
require 'google/api/annotations_pb'
|
7
7
|
require 'google/api/client_pb'
|
8
8
|
require 'google/api/field_behavior_pb'
|
9
|
+
require 'google/api/resource_pb'
|
9
10
|
require 'google/cloud/dataproc/v1/shared_pb'
|
10
11
|
require 'google/longrunning/operations_pb'
|
11
12
|
require 'google/protobuf/duration_pb'
|
@@ -37,6 +38,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
37
38
|
optional :security_config, :message, 16, "google.cloud.dataproc.v1.SecurityConfig"
|
38
39
|
optional :lifecycle_config, :message, 17, "google.cloud.dataproc.v1.LifecycleConfig"
|
39
40
|
optional :endpoint_config, :message, 19, "google.cloud.dataproc.v1.EndpointConfig"
|
41
|
+
optional :metastore_config, :message, 20, "google.cloud.dataproc.v1.MetastoreConfig"
|
42
|
+
optional :gke_cluster_config, :message, 21, "google.cloud.dataproc.v1.GkeClusterConfig"
|
43
|
+
end
|
44
|
+
add_message "google.cloud.dataproc.v1.GkeClusterConfig" do
|
45
|
+
optional :namespaced_gke_deployment_target, :message, 1, "google.cloud.dataproc.v1.GkeClusterConfig.NamespacedGkeDeploymentTarget"
|
46
|
+
end
|
47
|
+
add_message "google.cloud.dataproc.v1.GkeClusterConfig.NamespacedGkeDeploymentTarget" do
|
48
|
+
optional :target_gke_cluster, :string, 1
|
49
|
+
optional :cluster_namespace, :string, 2
|
40
50
|
end
|
41
51
|
add_message "google.cloud.dataproc.v1.EndpointConfig" do
|
42
52
|
map :http_ports, :string, :string, 1
|
@@ -53,11 +63,28 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
53
63
|
optional :network_uri, :string, 2
|
54
64
|
optional :subnetwork_uri, :string, 6
|
55
65
|
optional :internal_ip_only, :bool, 7
|
66
|
+
optional :private_ipv6_google_access, :enum, 12, "google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess"
|
56
67
|
optional :service_account, :string, 8
|
57
68
|
repeated :service_account_scopes, :string, 3
|
58
69
|
repeated :tags, :string, 4
|
59
70
|
map :metadata, :string, :string, 5
|
60
71
|
optional :reservation_affinity, :message, 11, "google.cloud.dataproc.v1.ReservationAffinity"
|
72
|
+
optional :node_group_affinity, :message, 13, "google.cloud.dataproc.v1.NodeGroupAffinity"
|
73
|
+
optional :shielded_instance_config, :message, 14, "google.cloud.dataproc.v1.ShieldedInstanceConfig"
|
74
|
+
end
|
75
|
+
add_enum "google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess" do
|
76
|
+
value :PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED, 0
|
77
|
+
value :INHERIT_FROM_SUBNETWORK, 1
|
78
|
+
value :OUTBOUND, 2
|
79
|
+
value :BIDIRECTIONAL, 3
|
80
|
+
end
|
81
|
+
add_message "google.cloud.dataproc.v1.NodeGroupAffinity" do
|
82
|
+
optional :node_group_uri, :string, 1
|
83
|
+
end
|
84
|
+
add_message "google.cloud.dataproc.v1.ShieldedInstanceConfig" do
|
85
|
+
optional :enable_secure_boot, :bool, 1
|
86
|
+
optional :enable_vtpm, :bool, 2
|
87
|
+
optional :enable_integrity_monitoring, :bool, 3
|
61
88
|
end
|
62
89
|
add_message "google.cloud.dataproc.v1.InstanceGroupConfig" do
|
63
90
|
optional :num_instances, :int32, 1
|
@@ -106,6 +133,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
106
133
|
value :ERROR, 3
|
107
134
|
value :DELETING, 4
|
108
135
|
value :UPDATING, 5
|
136
|
+
value :STOPPING, 6
|
137
|
+
value :STOPPED, 7
|
138
|
+
value :STARTING, 8
|
109
139
|
end
|
110
140
|
add_enum "google.cloud.dataproc.v1.ClusterStatus.Substate" do
|
111
141
|
value :UNSPECIFIED, 0
|
@@ -114,6 +144,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
114
144
|
end
|
115
145
|
add_message "google.cloud.dataproc.v1.SecurityConfig" do
|
116
146
|
optional :kerberos_config, :message, 1, "google.cloud.dataproc.v1.KerberosConfig"
|
147
|
+
optional :identity_config, :message, 2, "google.cloud.dataproc.v1.IdentityConfig"
|
117
148
|
end
|
118
149
|
add_message "google.cloud.dataproc.v1.KerberosConfig" do
|
119
150
|
optional :enable_kerberos, :bool, 1
|
@@ -132,6 +163,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
132
163
|
optional :tgt_lifetime_hours, :int32, 14
|
133
164
|
optional :realm, :string, 15
|
134
165
|
end
|
166
|
+
add_message "google.cloud.dataproc.v1.IdentityConfig" do
|
167
|
+
map :user_service_account_mapping, :string, :string, 1
|
168
|
+
end
|
135
169
|
add_message "google.cloud.dataproc.v1.SoftwareConfig" do
|
136
170
|
optional :image_version, :string, 1
|
137
171
|
map :properties, :string, :string, 2
|
@@ -145,6 +179,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
145
179
|
optional :auto_delete_ttl, :message, 3, "google.protobuf.Duration"
|
146
180
|
end
|
147
181
|
end
|
182
|
+
add_message "google.cloud.dataproc.v1.MetastoreConfig" do
|
183
|
+
optional :dataproc_metastore_service, :string, 1
|
184
|
+
end
|
148
185
|
add_message "google.cloud.dataproc.v1.ClusterMetrics" do
|
149
186
|
map :hdfs_metrics, :string, :int64, 1
|
150
187
|
map :yarn_metrics, :string, :int64, 2
|
@@ -164,6 +201,20 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
164
201
|
optional :update_mask, :message, 4, "google.protobuf.FieldMask"
|
165
202
|
optional :request_id, :string, 7
|
166
203
|
end
|
204
|
+
add_message "google.cloud.dataproc.v1.StopClusterRequest" do
|
205
|
+
optional :project_id, :string, 1
|
206
|
+
optional :region, :string, 2
|
207
|
+
optional :cluster_name, :string, 3
|
208
|
+
optional :cluster_uuid, :string, 4
|
209
|
+
optional :request_id, :string, 5
|
210
|
+
end
|
211
|
+
add_message "google.cloud.dataproc.v1.StartClusterRequest" do
|
212
|
+
optional :project_id, :string, 1
|
213
|
+
optional :region, :string, 2
|
214
|
+
optional :cluster_name, :string, 3
|
215
|
+
optional :cluster_uuid, :string, 4
|
216
|
+
optional :request_id, :string, 5
|
217
|
+
end
|
167
218
|
add_message "google.cloud.dataproc.v1.DeleteClusterRequest" do
|
168
219
|
optional :project_id, :string, 1
|
169
220
|
optional :region, :string, 3
|
@@ -215,10 +266,15 @@ module Google
|
|
215
266
|
module V1
|
216
267
|
Cluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.Cluster").msgclass
|
217
268
|
ClusterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ClusterConfig").msgclass
|
269
|
+
GkeClusterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.GkeClusterConfig").msgclass
|
270
|
+
GkeClusterConfig::NamespacedGkeDeploymentTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.GkeClusterConfig.NamespacedGkeDeploymentTarget").msgclass
|
218
271
|
EndpointConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.EndpointConfig").msgclass
|
219
272
|
AutoscalingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.AutoscalingConfig").msgclass
|
220
273
|
EncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.EncryptionConfig").msgclass
|
221
274
|
GceClusterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.GceClusterConfig").msgclass
|
275
|
+
GceClusterConfig::PrivateIpv6GoogleAccess = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess").enummodule
|
276
|
+
NodeGroupAffinity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.NodeGroupAffinity").msgclass
|
277
|
+
ShieldedInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ShieldedInstanceConfig").msgclass
|
222
278
|
InstanceGroupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.InstanceGroupConfig").msgclass
|
223
279
|
InstanceGroupConfig::Preemptibility = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility").enummodule
|
224
280
|
ManagedGroupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ManagedGroupConfig").msgclass
|
@@ -230,11 +286,15 @@ module Google
|
|
230
286
|
ClusterStatus::Substate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ClusterStatus.Substate").enummodule
|
231
287
|
SecurityConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.SecurityConfig").msgclass
|
232
288
|
KerberosConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.KerberosConfig").msgclass
|
289
|
+
IdentityConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.IdentityConfig").msgclass
|
233
290
|
SoftwareConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.SoftwareConfig").msgclass
|
234
291
|
LifecycleConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.LifecycleConfig").msgclass
|
292
|
+
MetastoreConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.MetastoreConfig").msgclass
|
235
293
|
ClusterMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ClusterMetrics").msgclass
|
236
294
|
CreateClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.CreateClusterRequest").msgclass
|
237
295
|
UpdateClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.UpdateClusterRequest").msgclass
|
296
|
+
StopClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.StopClusterRequest").msgclass
|
297
|
+
StartClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.StartClusterRequest").msgclass
|
238
298
|
DeleteClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.DeleteClusterRequest").msgclass
|
239
299
|
GetClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.GetClusterRequest").msgclass
|
240
300
|
ListClustersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1.ListClustersRequest").msgclass
|
@@ -42,6 +42,10 @@ module Google
|
|
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
44
|
rpc :UpdateCluster, ::Google::Cloud::Dataproc::V1::UpdateClusterRequest, ::Google::Longrunning::Operation
|
45
|
+
# Stops a cluster in a project.
|
46
|
+
rpc :StopCluster, ::Google::Cloud::Dataproc::V1::StopClusterRequest, ::Google::Longrunning::Operation
|
47
|
+
# Starts a cluster in a project.
|
48
|
+
rpc :StartCluster, ::Google::Cloud::Dataproc::V1::StartClusterRequest, ::Google::Longrunning::Operation
|
45
49
|
# Deletes a cluster in a project. The returned
|
46
50
|
# [Operation.metadata][google.longrunning.Operation.metadata] will be
|
47
51
|
# [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
|
@@ -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
|
@@ -243,8 +216,9 @@ module Google
|
|
243
216
|
# Required. The job resource.
|
244
217
|
# @param request_id [::String]
|
245
218
|
# Optional. A unique id used to identify the request. If the server
|
246
|
-
# receives two
|
247
|
-
#
|
219
|
+
# receives two
|
220
|
+
# [SubmitJobRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.SubmitJobRequest)s
|
221
|
+
# with the same id, then the second request will be ignored and the
|
248
222
|
# first {::Google::Cloud::Dataproc::V1::Job Job} created and stored in the backend
|
249
223
|
# is returned.
|
250
224
|
#
|
@@ -289,7 +263,9 @@ module Google
|
|
289
263
|
options.apply_defaults timeout: @config.rpcs.submit_job.timeout,
|
290
264
|
metadata: metadata,
|
291
265
|
retry_policy: @config.rpcs.submit_job.retry_policy
|
292
|
-
|
266
|
+
|
267
|
+
options.apply_defaults timeout: @config.timeout,
|
268
|
+
metadata: @config.metadata,
|
293
269
|
retry_policy: @config.retry_policy
|
294
270
|
|
295
271
|
@job_controller_stub.call_rpc :submit_job, request, options: options do |response, operation|
|
@@ -327,8 +303,9 @@ module Google
|
|
327
303
|
# Required. The job resource.
|
328
304
|
# @param request_id [::String]
|
329
305
|
# Optional. A unique id used to identify the request. If the server
|
330
|
-
# receives two
|
331
|
-
#
|
306
|
+
# receives two
|
307
|
+
# [SubmitJobRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.SubmitJobRequest)s
|
308
|
+
# with the same id, then the second request will be ignored and the
|
332
309
|
# first {::Google::Cloud::Dataproc::V1::Job Job} created and stored in the backend
|
333
310
|
# is returned.
|
334
311
|
#
|
@@ -373,7 +350,9 @@ module Google
|
|
373
350
|
options.apply_defaults timeout: @config.rpcs.submit_job_as_operation.timeout,
|
374
351
|
metadata: metadata,
|
375
352
|
retry_policy: @config.rpcs.submit_job_as_operation.retry_policy
|
376
|
-
|
353
|
+
|
354
|
+
options.apply_defaults timeout: @config.timeout,
|
355
|
+
metadata: @config.metadata,
|
377
356
|
retry_policy: @config.retry_policy
|
378
357
|
|
379
358
|
@job_controller_stub.call_rpc :submit_job_as_operation, request, options: options do |response, operation|
|
@@ -447,7 +426,9 @@ module Google
|
|
447
426
|
options.apply_defaults timeout: @config.rpcs.get_job.timeout,
|
448
427
|
metadata: metadata,
|
449
428
|
retry_policy: @config.rpcs.get_job.retry_policy
|
450
|
-
|
429
|
+
|
430
|
+
options.apply_defaults timeout: @config.timeout,
|
431
|
+
metadata: @config.metadata,
|
451
432
|
retry_policy: @config.retry_policy
|
452
433
|
|
453
434
|
@job_controller_stub.call_rpc :get_job, request, options: options do |response, operation|
|
@@ -545,7 +526,9 @@ module Google
|
|
545
526
|
options.apply_defaults timeout: @config.rpcs.list_jobs.timeout,
|
546
527
|
metadata: metadata,
|
547
528
|
retry_policy: @config.rpcs.list_jobs.retry_policy
|
548
|
-
|
529
|
+
|
530
|
+
options.apply_defaults timeout: @config.timeout,
|
531
|
+
metadata: @config.metadata,
|
549
532
|
retry_policy: @config.retry_policy
|
550
533
|
|
551
534
|
@job_controller_stub.call_rpc :list_jobs, request, options: options do |response, operation|
|
@@ -628,7 +611,9 @@ module Google
|
|
628
611
|
options.apply_defaults timeout: @config.rpcs.update_job.timeout,
|
629
612
|
metadata: metadata,
|
630
613
|
retry_policy: @config.rpcs.update_job.retry_policy
|
631
|
-
|
614
|
+
|
615
|
+
options.apply_defaults timeout: @config.timeout,
|
616
|
+
metadata: @config.metadata,
|
632
617
|
retry_policy: @config.retry_policy
|
633
618
|
|
634
619
|
@job_controller_stub.call_rpc :update_job, request, options: options do |response, operation|
|
@@ -705,7 +690,9 @@ module Google
|
|
705
690
|
options.apply_defaults timeout: @config.rpcs.cancel_job.timeout,
|
706
691
|
metadata: metadata,
|
707
692
|
retry_policy: @config.rpcs.cancel_job.retry_policy
|
708
|
-
|
693
|
+
|
694
|
+
options.apply_defaults timeout: @config.timeout,
|
695
|
+
metadata: @config.metadata,
|
709
696
|
retry_policy: @config.retry_policy
|
710
697
|
|
711
698
|
@job_controller_stub.call_rpc :cancel_job, request, options: options do |response, operation|
|
@@ -779,7 +766,9 @@ module Google
|
|
779
766
|
options.apply_defaults timeout: @config.rpcs.delete_job.timeout,
|
780
767
|
metadata: metadata,
|
781
768
|
retry_policy: @config.rpcs.delete_job.retry_policy
|
782
|
-
|
769
|
+
|
770
|
+
options.apply_defaults timeout: @config.timeout,
|
771
|
+
metadata: @config.metadata,
|
783
772
|
retry_policy: @config.retry_policy
|
784
773
|
|
785
774
|
@job_controller_stub.call_rpc :delete_job, request, options: options do |response, operation|
|
@@ -803,22 +792,21 @@ module Google
|
|
803
792
|
# Configuration can be applied globally to all clients, or to a single client
|
804
793
|
# on construction.
|
805
794
|
#
|
806
|
-
#
|
807
|
-
#
|
808
|
-
#
|
809
|
-
# to 20 seconds,
|
810
|
-
#
|
811
|
-
#
|
812
|
-
#
|
813
|
-
#
|
814
|
-
#
|
815
|
-
#
|
816
|
-
#
|
817
|
-
#
|
818
|
-
#
|
819
|
-
#
|
820
|
-
#
|
821
|
-
# 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
|
822
810
|
#
|
823
811
|
# @!attribute [rw] endpoint
|
824
812
|
# The hostname or hostname:port of the service endpoint.
|