google-cloud-dataproc 0.3.1 → 0.4.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.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/dataproc.rb +53 -0
  3. data/lib/google/cloud/dataproc/v1/cluster_controller_client.rb +14 -16
  4. data/lib/google/cloud/dataproc/v1/clusters_pb.rb +2 -0
  5. data/lib/google/cloud/dataproc/v1/clusters_services_pb.rb +1 -1
  6. data/lib/google/cloud/dataproc/v1/doc/google/cloud/dataproc/v1/clusters.rb +29 -26
  7. data/lib/google/cloud/dataproc/v1/doc/google/cloud/dataproc/v1/jobs.rb +8 -7
  8. data/lib/google/cloud/dataproc/v1/doc/google/cloud/dataproc/v1/workflow_templates.rb +6 -6
  9. data/lib/google/cloud/dataproc/v1/job_controller_client.rb +4 -3
  10. data/lib/google/cloud/dataproc/v1/jobs_services_pb.rb +1 -1
  11. data/lib/google/cloud/dataproc/v1/shared_pb.rb +26 -0
  12. data/lib/google/cloud/dataproc/v1/workflow_template_service_client.rb +3 -3
  13. data/lib/google/cloud/dataproc/v1/workflow_templates_services_pb.rb +2 -3
  14. data/lib/google/cloud/dataproc/v1beta2.rb +58 -0
  15. data/lib/google/cloud/dataproc/v1beta2/autoscaling_policies_pb.rb +81 -0
  16. data/lib/google/cloud/dataproc/v1beta2/autoscaling_policies_services_pb.rb +60 -0
  17. data/lib/google/cloud/dataproc/v1beta2/autoscaling_policy_service_client.rb +457 -0
  18. data/lib/google/cloud/dataproc/v1beta2/autoscaling_policy_service_client_config.json +51 -0
  19. data/lib/google/cloud/dataproc/v1beta2/cluster_controller_client.rb +18 -16
  20. data/lib/google/cloud/dataproc/v1beta2/clusters_pb.rb +48 -0
  21. data/lib/google/cloud/dataproc/v1beta2/clusters_services_pb.rb +1 -1
  22. data/lib/google/cloud/dataproc/v1beta2/doc/google/cloud/dataproc/v1beta2/autoscaling_policies.rb +202 -0
  23. data/lib/google/cloud/dataproc/v1beta2/doc/google/cloud/dataproc/v1beta2/clusters.rb +172 -28
  24. data/lib/google/cloud/dataproc/v1beta2/doc/google/cloud/dataproc/v1beta2/jobs.rb +44 -9
  25. data/lib/google/cloud/dataproc/v1beta2/doc/google/cloud/dataproc/v1beta2/workflow_templates.rb +8 -6
  26. data/lib/google/cloud/dataproc/v1beta2/job_controller_client.rb +5 -5
  27. data/lib/google/cloud/dataproc/v1beta2/jobs_pb.rb +10 -0
  28. data/lib/google/cloud/dataproc/v1beta2/jobs_services_pb.rb +1 -1
  29. data/lib/google/cloud/dataproc/v1beta2/shared_pb.rb +12 -0
  30. data/lib/google/cloud/dataproc/v1beta2/workflow_template_service_client.rb +3 -3
  31. data/lib/google/cloud/dataproc/v1beta2/workflow_templates_services_pb.rb +2 -3
  32. data/lib/google/cloud/dataproc/version.rb +22 -0
  33. metadata +9 -2
@@ -289,6 +289,38 @@ module Google
289
289
  # Optional. The runtime log config for job execution.
290
290
  class PigJob; end
291
291
 
292
+ # A Cloud Dataproc job for running
293
+ # [Apache SparkR](https://spark.apache.org/docs/latest/sparkr.html)
294
+ # applications on YARN.
295
+ # @!attribute [rw] main_r_file_uri
296
+ # @return [String]
297
+ # Required. The HCFS URI of the main R file to use as the driver.
298
+ # Must be a .R file.
299
+ # @!attribute [rw] args
300
+ # @return [Array<String>]
301
+ # Optional. The arguments to pass to the driver. Do not include arguments,
302
+ # such as `--conf`, that can be set as job properties, since a collision may
303
+ # occur that causes an incorrect job submission.
304
+ # @!attribute [rw] file_uris
305
+ # @return [Array<String>]
306
+ # Optional. HCFS URIs of files to be copied to the working directory of
307
+ # R drivers and distributed tasks. Useful for naively parallel tasks.
308
+ # @!attribute [rw] archive_uris
309
+ # @return [Array<String>]
310
+ # Optional. HCFS URIs of archives to be extracted in the working directory of
311
+ # Spark drivers and tasks. Supported file types:
312
+ # .jar, .tar, .tar.gz, .tgz, and .zip.
313
+ # @!attribute [rw] properties
314
+ # @return [Hash{String => String}]
315
+ # Optional. A mapping of property names to values, used to configure SparkR.
316
+ # Properties that conflict with values set by the Cloud Dataproc API may be
317
+ # overwritten. Can include properties set in
318
+ # /etc/spark/conf/spark-defaults.conf and classes in user code.
319
+ # @!attribute [rw] logging_config
320
+ # @return [Google::Cloud::Dataproc::V1beta2::LoggingConfig]
321
+ # Optional. The runtime log config for job execution.
322
+ class SparkRJob; end
323
+
292
324
  # Cloud Dataproc job config.
293
325
  # @!attribute [rw] cluster_name
294
326
  # @return [String]
@@ -386,11 +418,12 @@ module Google
386
418
  # belongs to.
387
419
  # @!attribute [rw] job_id
388
420
  # @return [String]
389
- # Optional. The job ID, which must be unique within the project. The job ID
390
- # is generated by the server upon job submission or provided by the user as a
391
- # means to perform retries without creating duplicate jobs. The ID must
392
- # contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or
393
- # hyphens (-). The maximum length is 100 characters.
421
+ # Optional. The job ID, which must be unique within the project.
422
+ #
423
+ # The ID must contain only letters (a-z, A-Z), numbers (0-9),
424
+ # underscores (_), or hyphens (-). The maximum length is 100 characters.
425
+ #
426
+ # If not specified by the caller, the job ID will be provided by the server.
394
427
  class JobReference; end
395
428
 
396
429
  # A YARN application created by a job. Application information is a subset of
@@ -472,6 +505,9 @@ module Google
472
505
  # @!attribute [rw] pig_job
473
506
  # @return [Google::Cloud::Dataproc::V1beta2::PigJob]
474
507
  # Job is a Pig job.
508
+ # @!attribute [rw] spark_r_job
509
+ # @return [Google::Cloud::Dataproc::V1beta2::SparkRJob]
510
+ # Job is a SparkR job.
475
511
  # @!attribute [rw] spark_sql_job
476
512
  # @return [Google::Cloud::Dataproc::V1beta2::SparkSqlJob]
477
513
  # Job is a SparkSql job.
@@ -548,10 +584,9 @@ module Google
548
584
  # @!attribute [rw] request_id
549
585
  # @return [String]
550
586
  # Optional. A unique id used to identify the request. If the server
551
- # receives two
552
- # {Google::Cloud::Dataproc::V1beta2::SubmitJobRequest SubmitJobRequest} requests
553
- # with the same id, then the second request will be ignored and the first
554
- # {Google::Cloud::Dataproc::V1beta2::Job Job} created and stored in the backend
587
+ # receives two {Google::Cloud::Dataproc::V1beta2::SubmitJobRequest SubmitJobRequest} requests with the same
588
+ # id, then the second request will be ignored and the
589
+ # first {Google::Cloud::Dataproc::V1beta2::Job Job} created and stored in the backend
555
590
  # is returned.
556
591
  #
557
592
  # It is recommended to always set this value to a
@@ -25,6 +25,8 @@ module Google
25
25
  # The id must contain only letters (a-z, A-Z), numbers (0-9),
26
26
  # underscores (_), and hyphens (-). Cannot begin or end with underscore
27
27
  # or hyphen. Must consist of between 3 and 50 characters.
28
+ #
29
+ # .
28
30
  # @!attribute [rw] name
29
31
  # @return [String]
30
32
  # Output only. The "resource name" of the template, as described
@@ -136,8 +138,8 @@ module Google
136
138
  #
137
139
  # The step id is used as prefix for job id, as job
138
140
  # `goog-dataproc-workflow-step-id` label, and in
139
- # {Google::Cloud::Dataproc::V1beta2::OrderedJob#prerequisite_step_ids prerequisiteStepIds}
140
- # field from other steps.
141
+ # {Google::Cloud::Dataproc::V1beta2::OrderedJob#prerequisite_step_ids prerequisiteStepIds} field from other
142
+ # steps.
141
143
  #
142
144
  # The id must contain only letters (a-z, A-Z), numbers (0-9),
143
145
  # underscores (_), and hyphens (-). Cannot begin or end with underscore
@@ -205,10 +207,10 @@ module Google
205
207
  # A field is allowed to appear in at most one parameter's list of field
206
208
  # paths.
207
209
  #
208
- # A field path is similar in syntax to a
209
- # {Google::Protobuf::FieldMask}. For example, a
210
- # field path that references the zone field of a workflow template's cluster
211
- # selector would be specified as `placement.clusterSelector.zone`.
210
+ # A field path is similar in syntax to a {Google::Protobuf::FieldMask}.
211
+ # For example, a field path that references the zone field of a workflow
212
+ # template's cluster selector would be specified as
213
+ # `placement.clusterSelector.zone`.
212
214
  #
213
215
  # Also, field paths can reference fields using the following syntax:
214
216
  #
@@ -27,6 +27,7 @@ require "google/gax"
27
27
 
28
28
  require "google/cloud/dataproc/v1beta2/jobs_pb"
29
29
  require "google/cloud/dataproc/v1beta2/credentials"
30
+ require "google/cloud/dataproc/version"
30
31
 
31
32
  module Google
32
33
  module Cloud
@@ -129,7 +130,7 @@ module Google
129
130
  updater_proc = credentials.updater_proc
130
131
  end
131
132
 
132
- package_version = Gem.loaded_specs['google-cloud-dataproc'].version.version
133
+ package_version = Google::Cloud::Dataproc::VERSION
133
134
 
134
135
  google_api_client = "gl-ruby/#{RUBY_VERSION}"
135
136
  google_api_client << " #{lib_name}/#{lib_version}" if lib_name
@@ -217,10 +218,9 @@ module Google
217
218
  # can also be provided.
218
219
  # @param request_id [String]
219
220
  # Optional. A unique id used to identify the request. If the server
220
- # receives two
221
- # {Google::Cloud::Dataproc::V1beta2::SubmitJobRequest SubmitJobRequest} requests
222
- # with the same id, then the second request will be ignored and the first
223
- # {Google::Cloud::Dataproc::V1beta2::Job Job} created and stored in the backend
221
+ # receives two {Google::Cloud::Dataproc::V1beta2::SubmitJobRequest SubmitJobRequest} requests with the same
222
+ # id, then the second request will be ignored and the
223
+ # first {Google::Cloud::Dataproc::V1beta2::Job Job} created and stored in the backend
224
224
  # is returned.
225
225
  #
226
226
  # It is recommended to always set this value to a
@@ -91,6 +91,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
91
91
  optional :query_list, :message, 2, "google.cloud.dataproc.v1beta2.QueryList"
92
92
  end
93
93
  end
94
+ add_message "google.cloud.dataproc.v1beta2.SparkRJob" do
95
+ optional :main_r_file_uri, :string, 1
96
+ repeated :args, :string, 2
97
+ repeated :file_uris, :string, 3
98
+ repeated :archive_uris, :string, 4
99
+ map :properties, :string, :string, 5
100
+ optional :logging_config, :message, 6, "google.cloud.dataproc.v1beta2.LoggingConfig"
101
+ end
94
102
  add_message "google.cloud.dataproc.v1beta2.JobPlacement" do
95
103
  optional :cluster_name, :string, 1
96
104
  optional :cluster_uuid, :string, 2
@@ -158,6 +166,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
158
166
  optional :pyspark_job, :message, 5, "google.cloud.dataproc.v1beta2.PySparkJob"
159
167
  optional :hive_job, :message, 6, "google.cloud.dataproc.v1beta2.HiveJob"
160
168
  optional :pig_job, :message, 7, "google.cloud.dataproc.v1beta2.PigJob"
169
+ optional :spark_r_job, :message, 21, "google.cloud.dataproc.v1beta2.SparkRJob"
161
170
  optional :spark_sql_job, :message, 12, "google.cloud.dataproc.v1beta2.SparkSqlJob"
162
171
  end
163
172
  end
@@ -225,6 +234,7 @@ module Google
225
234
  HiveJob = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.HiveJob").msgclass
226
235
  SparkSqlJob = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.SparkSqlJob").msgclass
227
236
  PigJob = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.PigJob").msgclass
237
+ SparkRJob = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.SparkRJob").msgclass
228
238
  JobPlacement = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.JobPlacement").msgclass
229
239
  JobStatus = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.JobStatus").msgclass
230
240
  JobStatus::State = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.JobStatus.State").enummodule
@@ -1,7 +1,7 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # Source: google/cloud/dataproc/v1beta2/jobs.proto for package 'google.cloud.dataproc.v1beta2'
3
3
  # Original file comments:
4
- # Copyright 2018 Google LLC.
4
+ # Copyright 2019 Google LLC.
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
7
7
  # you may not use this file except in compliance with the License.
@@ -6,12 +6,24 @@ require 'google/protobuf'
6
6
 
7
7
  require 'google/api/annotations_pb'
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_enum "google.cloud.dataproc.v1beta2.Component" do
10
+ value :COMPONENT_UNSPECIFIED, 0
11
+ value :ANACONDA, 5
12
+ value :DRUID, 9
13
+ value :HIVE_WEBHCAT, 3
14
+ value :JUPYTER, 1
15
+ value :KERBEROS, 7
16
+ value :PRESTO, 6
17
+ value :ZEPPELIN, 4
18
+ value :ZOOKEEPER, 8
19
+ end
9
20
  end
10
21
 
11
22
  module Google
12
23
  module Cloud
13
24
  module Dataproc
14
25
  module V1beta2
26
+ Component = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataproc.v1beta2.Component").enummodule
15
27
  end
16
28
  end
17
29
  end
@@ -29,6 +29,7 @@ require "google/longrunning/operations_client"
29
29
 
30
30
  require "google/cloud/dataproc/v1beta2/workflow_templates_pb"
31
31
  require "google/cloud/dataproc/v1beta2/credentials"
32
+ require "google/cloud/dataproc/version"
32
33
 
33
34
  module Google
34
35
  module Cloud
@@ -181,7 +182,7 @@ module Google
181
182
  updater_proc = credentials.updater_proc
182
183
  end
183
184
 
184
- package_version = Gem.loaded_specs['google-cloud-dataproc'].version.version
185
+ package_version = Google::Cloud::Dataproc::VERSION
185
186
 
186
187
  google_api_client = "gl-ruby/#{RUBY_VERSION}"
187
188
  google_api_client << " #{lib_name}/#{lib_version}" if lib_name
@@ -477,8 +478,7 @@ module Google
477
478
  # Instantiates a template and begins execution.
478
479
  #
479
480
  # This method is equivalent to executing the sequence
480
- # {Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::CreateWorkflowTemplate CreateWorkflowTemplate},
481
- # {Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::InstantiateWorkflowTemplate InstantiateWorkflowTemplate},
481
+ # {Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::CreateWorkflowTemplate CreateWorkflowTemplate}, {Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::InstantiateWorkflowTemplate InstantiateWorkflowTemplate},
482
482
  # {Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::DeleteWorkflowTemplate DeleteWorkflowTemplate}.
483
483
  #
484
484
  # The returned Operation can be used to track execution of
@@ -1,7 +1,7 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # Source: google/cloud/dataproc/v1beta2/workflow_templates.proto for package 'google.cloud.dataproc.v1beta2'
3
3
  # Original file comments:
4
- # Copyright 2018 Google LLC.
4
+ # Copyright 2019 Google LLC.
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
7
7
  # you may not use this file except in compliance with the License.
@@ -65,8 +65,7 @@ module Google
65
65
  # Instantiates a template and begins execution.
66
66
  #
67
67
  # This method is equivalent to executing the sequence
68
- # [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate],
69
- # [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate],
68
+ # [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate],
70
69
  # [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.DeleteWorkflowTemplate].
71
70
  #
72
71
  # The returned Operation can be used to track execution of
@@ -0,0 +1,22 @@
1
+ # Copyright 2019 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+
16
+ module Google
17
+ module Cloud
18
+ module Dataproc
19
+ VERSION = "0.4.0".freeze
20
+ end
21
+ end
22
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-dataproc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-29 00:00:00.000000000 Z
11
+ date: 2019-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-gax
@@ -127,16 +127,22 @@ files:
127
127
  - lib/google/cloud/dataproc/v1/jobs_pb.rb
128
128
  - lib/google/cloud/dataproc/v1/jobs_services_pb.rb
129
129
  - lib/google/cloud/dataproc/v1/operations_pb.rb
130
+ - lib/google/cloud/dataproc/v1/shared_pb.rb
130
131
  - lib/google/cloud/dataproc/v1/workflow_template_service_client.rb
131
132
  - lib/google/cloud/dataproc/v1/workflow_template_service_client_config.json
132
133
  - lib/google/cloud/dataproc/v1/workflow_templates_pb.rb
133
134
  - lib/google/cloud/dataproc/v1/workflow_templates_services_pb.rb
134
135
  - lib/google/cloud/dataproc/v1beta2.rb
136
+ - lib/google/cloud/dataproc/v1beta2/autoscaling_policies_pb.rb
137
+ - lib/google/cloud/dataproc/v1beta2/autoscaling_policies_services_pb.rb
138
+ - lib/google/cloud/dataproc/v1beta2/autoscaling_policy_service_client.rb
139
+ - lib/google/cloud/dataproc/v1beta2/autoscaling_policy_service_client_config.json
135
140
  - lib/google/cloud/dataproc/v1beta2/cluster_controller_client.rb
136
141
  - lib/google/cloud/dataproc/v1beta2/cluster_controller_client_config.json
137
142
  - lib/google/cloud/dataproc/v1beta2/clusters_pb.rb
138
143
  - lib/google/cloud/dataproc/v1beta2/clusters_services_pb.rb
139
144
  - lib/google/cloud/dataproc/v1beta2/credentials.rb
145
+ - lib/google/cloud/dataproc/v1beta2/doc/google/cloud/dataproc/v1beta2/autoscaling_policies.rb
140
146
  - lib/google/cloud/dataproc/v1beta2/doc/google/cloud/dataproc/v1beta2/clusters.rb
141
147
  - lib/google/cloud/dataproc/v1beta2/doc/google/cloud/dataproc/v1beta2/jobs.rb
142
148
  - lib/google/cloud/dataproc/v1beta2/doc/google/cloud/dataproc/v1beta2/workflow_templates.rb
@@ -157,6 +163,7 @@ files:
157
163
  - lib/google/cloud/dataproc/v1beta2/workflow_template_service_client_config.json
158
164
  - lib/google/cloud/dataproc/v1beta2/workflow_templates_pb.rb
159
165
  - lib/google/cloud/dataproc/v1beta2/workflow_templates_services_pb.rb
166
+ - lib/google/cloud/dataproc/version.rb
160
167
  homepage: https://github.com/googleapis/google-cloud-ruby/tree/master/google-cloud-dataproc
161
168
  licenses:
162
169
  - Apache-2.0