google-cloud-dataproc-v1 0.1.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 (53) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +169 -0
  4. data/LICENSE.md +203 -0
  5. data/README.md +71 -0
  6. data/lib/google/cloud/common_resources_pb.rb +15 -0
  7. data/lib/google/cloud/dataproc/v1/autoscaling_policies_pb.rb +81 -0
  8. data/lib/google/cloud/dataproc/v1/autoscaling_policies_services_pb.rb +58 -0
  9. data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/client.rb +734 -0
  10. data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/credentials.rb +51 -0
  11. data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/paths.rb +110 -0
  12. data/lib/google/cloud/dataproc/v1/autoscaling_policy_service.rb +50 -0
  13. data/lib/google/cloud/dataproc/v1/cluster_controller/client.rb +970 -0
  14. data/lib/google/cloud/dataproc/v1/cluster_controller/credentials.rb +51 -0
  15. data/lib/google/cloud/dataproc/v1/cluster_controller/operations.rb +564 -0
  16. data/lib/google/cloud/dataproc/v1/cluster_controller.rb +50 -0
  17. data/lib/google/cloud/dataproc/v1/clusters_pb.rb +235 -0
  18. data/lib/google/cloud/dataproc/v1/clusters_services_pb.rb +68 -0
  19. data/lib/google/cloud/dataproc/v1/job_controller/client.rb +980 -0
  20. data/lib/google/cloud/dataproc/v1/job_controller/credentials.rb +51 -0
  21. data/lib/google/cloud/dataproc/v1/job_controller/operations.rb +564 -0
  22. data/lib/google/cloud/dataproc/v1/job_controller.rb +49 -0
  23. data/lib/google/cloud/dataproc/v1/jobs_pb.rb +282 -0
  24. data/lib/google/cloud/dataproc/v1/jobs_services_pb.rb +62 -0
  25. data/lib/google/cloud/dataproc/v1/operations_pb.rb +46 -0
  26. data/lib/google/cloud/dataproc/v1/shared_pb.rb +29 -0
  27. data/lib/google/cloud/dataproc/v1/version.rb +28 -0
  28. data/lib/google/cloud/dataproc/v1/workflow_template_service/client.rb +1024 -0
  29. data/lib/google/cloud/dataproc/v1/workflow_template_service/credentials.rb +51 -0
  30. data/lib/google/cloud/dataproc/v1/workflow_template_service/operations.rb +564 -0
  31. data/lib/google/cloud/dataproc/v1/workflow_template_service/paths.rb +110 -0
  32. data/lib/google/cloud/dataproc/v1/workflow_template_service.rb +51 -0
  33. data/lib/google/cloud/dataproc/v1/workflow_templates_pb.rb +187 -0
  34. data/lib/google/cloud/dataproc/v1/workflow_templates_services_pb.rb +104 -0
  35. data/lib/google/cloud/dataproc/v1.rb +38 -0
  36. data/lib/google-cloud-dataproc-v1.rb +21 -0
  37. data/proto_docs/README.md +4 -0
  38. data/proto_docs/google/api/field_behavior.rb +59 -0
  39. data/proto_docs/google/api/resource.rb +247 -0
  40. data/proto_docs/google/cloud/dataproc/v1/autoscaling_policies.rb +272 -0
  41. data/proto_docs/google/cloud/dataproc/v1/clusters.rb +961 -0
  42. data/proto_docs/google/cloud/dataproc/v1/jobs.rb +976 -0
  43. data/proto_docs/google/cloud/dataproc/v1/operations.rb +98 -0
  44. data/proto_docs/google/cloud/dataproc/v1/shared.rb +50 -0
  45. data/proto_docs/google/cloud/dataproc/v1/workflow_templates.rb +693 -0
  46. data/proto_docs/google/longrunning/operations.rb +150 -0
  47. data/proto_docs/google/protobuf/any.rb +138 -0
  48. data/proto_docs/google/protobuf/duration.rb +98 -0
  49. data/proto_docs/google/protobuf/empty.rb +36 -0
  50. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  51. data/proto_docs/google/protobuf/timestamp.rb +120 -0
  52. data/proto_docs/google/rpc/status.rb +46 -0
  53. metadata +205 -0
@@ -0,0 +1,976 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 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
+ # The runtime logging config of the job.
25
+ # @!attribute [rw] driver_log_levels
26
+ # @return [Google::Protobuf::Map{String => Google::Cloud::Dataproc::V1::LoggingConfig::Level}]
27
+ # The per-package log levels for the driver. This may include
28
+ # "root" package name to configure rootLogger.
29
+ # Examples:
30
+ # 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
31
+ class LoggingConfig
32
+ include Google::Protobuf::MessageExts
33
+ extend Google::Protobuf::MessageExts::ClassMethods
34
+
35
+ # @!attribute [rw] key
36
+ # @return [String]
37
+ # @!attribute [rw] value
38
+ # @return [Google::Cloud::Dataproc::V1::LoggingConfig::Level]
39
+ class DriverLogLevelsEntry
40
+ include Google::Protobuf::MessageExts
41
+ extend Google::Protobuf::MessageExts::ClassMethods
42
+ end
43
+
44
+ # The Log4j level for job execution. When running an
45
+ # [Apache Hive](http://hive.apache.org/) job, Cloud
46
+ # Dataproc configures the Hive client to an equivalent verbosity level.
47
+ module Level
48
+ # Level is unspecified. Use default level for log4j.
49
+ LEVEL_UNSPECIFIED = 0
50
+
51
+ # Use ALL level for log4j.
52
+ ALL = 1
53
+
54
+ # Use TRACE level for log4j.
55
+ TRACE = 2
56
+
57
+ # Use DEBUG level for log4j.
58
+ DEBUG = 3
59
+
60
+ # Use INFO level for log4j.
61
+ INFO = 4
62
+
63
+ # Use WARN level for log4j.
64
+ WARN = 5
65
+
66
+ # Use ERROR level for log4j.
67
+ ERROR = 6
68
+
69
+ # Use FATAL level for log4j.
70
+ FATAL = 7
71
+
72
+ # Turn off log4j.
73
+ OFF = 8
74
+ end
75
+ end
76
+
77
+ # A Dataproc job for running
78
+ # [Apache Hadoop
79
+ # MapReduce](https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html)
80
+ # jobs on [Apache Hadoop
81
+ # YARN](https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html).
82
+ # @!attribute [rw] main_jar_file_uri
83
+ # @return [String]
84
+ # The HCFS URI of the jar file containing the main class.
85
+ # Examples:
86
+ # 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
87
+ # 'hdfs:/tmp/test-samples/custom-wordcount.jar'
88
+ # 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
89
+ # @!attribute [rw] main_class
90
+ # @return [String]
91
+ # The name of the driver's main class. The jar file containing the class
92
+ # must be in the default CLASSPATH or specified in `jar_file_uris`.
93
+ # @!attribute [rw] args
94
+ # @return [Array<String>]
95
+ # Optional. The arguments to pass to the driver. Do not
96
+ # include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as
97
+ # job properties, since a collision may occur that causes an incorrect job
98
+ # submission.
99
+ # @!attribute [rw] jar_file_uris
100
+ # @return [Array<String>]
101
+ # Optional. Jar file URIs to add to the CLASSPATHs of the
102
+ # Hadoop driver and tasks.
103
+ # @!attribute [rw] file_uris
104
+ # @return [Array<String>]
105
+ # Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
106
+ # to the working directory of Hadoop drivers and distributed tasks. Useful
107
+ # for naively parallel tasks.
108
+ # @!attribute [rw] archive_uris
109
+ # @return [Array<String>]
110
+ # Optional. HCFS URIs of archives to be extracted in the working directory of
111
+ # Hadoop drivers and tasks. Supported file types:
112
+ # .jar, .tar, .tar.gz, .tgz, or .zip.
113
+ # @!attribute [rw] properties
114
+ # @return [Google::Protobuf::Map{String => String}]
115
+ # Optional. A mapping of property names to values, used to configure Hadoop.
116
+ # Properties that conflict with values set by the Dataproc API may be
117
+ # overwritten. Can include properties set in /etc/hadoop/conf/*-site and
118
+ # classes in user code.
119
+ # @!attribute [rw] logging_config
120
+ # @return [Google::Cloud::Dataproc::V1::LoggingConfig]
121
+ # Optional. The runtime log config for job execution.
122
+ class HadoopJob
123
+ include Google::Protobuf::MessageExts
124
+ extend Google::Protobuf::MessageExts::ClassMethods
125
+
126
+ # @!attribute [rw] key
127
+ # @return [String]
128
+ # @!attribute [rw] value
129
+ # @return [String]
130
+ class PropertiesEntry
131
+ include Google::Protobuf::MessageExts
132
+ extend Google::Protobuf::MessageExts::ClassMethods
133
+ end
134
+ end
135
+
136
+ # A Dataproc job for running [Apache Spark](http://spark.apache.org/)
137
+ # applications on YARN.
138
+ # @!attribute [rw] main_jar_file_uri
139
+ # @return [String]
140
+ # The HCFS URI of the jar file that contains the main class.
141
+ # @!attribute [rw] main_class
142
+ # @return [String]
143
+ # The name of the driver's main class. The jar file that contains the class
144
+ # must be in the default CLASSPATH or specified in `jar_file_uris`.
145
+ # @!attribute [rw] args
146
+ # @return [Array<String>]
147
+ # Optional. The arguments to pass to the driver. Do not include arguments,
148
+ # such as `--conf`, that can be set as job properties, since a collision may
149
+ # occur that causes an incorrect job submission.
150
+ # @!attribute [rw] jar_file_uris
151
+ # @return [Array<String>]
152
+ # Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
153
+ # Spark driver and tasks.
154
+ # @!attribute [rw] file_uris
155
+ # @return [Array<String>]
156
+ # Optional. HCFS URIs of files to be copied to the working directory of
157
+ # Spark drivers and distributed tasks. Useful for naively parallel tasks.
158
+ # @!attribute [rw] archive_uris
159
+ # @return [Array<String>]
160
+ # Optional. HCFS URIs of archives to be extracted in the working directory
161
+ # of Spark drivers and tasks. Supported file types:
162
+ # .jar, .tar, .tar.gz, .tgz, and .zip.
163
+ # @!attribute [rw] properties
164
+ # @return [Google::Protobuf::Map{String => String}]
165
+ # Optional. A mapping of property names to values, used to configure Spark.
166
+ # Properties that conflict with values set by the Dataproc API may be
167
+ # overwritten. Can include properties set in
168
+ # /etc/spark/conf/spark-defaults.conf and classes in user code.
169
+ # @!attribute [rw] logging_config
170
+ # @return [Google::Cloud::Dataproc::V1::LoggingConfig]
171
+ # Optional. The runtime log config for job execution.
172
+ class SparkJob
173
+ include Google::Protobuf::MessageExts
174
+ extend Google::Protobuf::MessageExts::ClassMethods
175
+
176
+ # @!attribute [rw] key
177
+ # @return [String]
178
+ # @!attribute [rw] value
179
+ # @return [String]
180
+ class PropertiesEntry
181
+ include Google::Protobuf::MessageExts
182
+ extend Google::Protobuf::MessageExts::ClassMethods
183
+ end
184
+ end
185
+
186
+ # A Dataproc job for running
187
+ # [Apache
188
+ # PySpark](https://spark.apache.org/docs/0.9.0/python-programming-guide.html)
189
+ # applications on YARN.
190
+ # @!attribute [rw] main_python_file_uri
191
+ # @return [String]
192
+ # Required. The HCFS URI of the main Python file to use as the driver. Must
193
+ # be a .py file.
194
+ # @!attribute [rw] args
195
+ # @return [Array<String>]
196
+ # Optional. The arguments to pass to the driver. Do not include arguments,
197
+ # such as `--conf`, that can be set as job properties, since a collision may
198
+ # occur that causes an incorrect job submission.
199
+ # @!attribute [rw] python_file_uris
200
+ # @return [Array<String>]
201
+ # Optional. HCFS file URIs of Python files to pass to the PySpark
202
+ # framework. Supported file types: .py, .egg, and .zip.
203
+ # @!attribute [rw] jar_file_uris
204
+ # @return [Array<String>]
205
+ # Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
206
+ # Python driver and tasks.
207
+ # @!attribute [rw] file_uris
208
+ # @return [Array<String>]
209
+ # Optional. HCFS URIs of files to be copied to the working directory of
210
+ # Python drivers and distributed tasks. Useful for naively parallel tasks.
211
+ # @!attribute [rw] archive_uris
212
+ # @return [Array<String>]
213
+ # Optional. HCFS URIs of archives to be extracted in the working directory of
214
+ # .jar, .tar, .tar.gz, .tgz, and .zip.
215
+ # @!attribute [rw] properties
216
+ # @return [Google::Protobuf::Map{String => String}]
217
+ # Optional. A mapping of property names to values, used to configure PySpark.
218
+ # Properties that conflict with values set by the Dataproc API may be
219
+ # overwritten. Can include properties set in
220
+ # /etc/spark/conf/spark-defaults.conf and classes in user code.
221
+ # @!attribute [rw] logging_config
222
+ # @return [Google::Cloud::Dataproc::V1::LoggingConfig]
223
+ # Optional. The runtime log config for job execution.
224
+ class PySparkJob
225
+ include Google::Protobuf::MessageExts
226
+ extend Google::Protobuf::MessageExts::ClassMethods
227
+
228
+ # @!attribute [rw] key
229
+ # @return [String]
230
+ # @!attribute [rw] value
231
+ # @return [String]
232
+ class PropertiesEntry
233
+ include Google::Protobuf::MessageExts
234
+ extend Google::Protobuf::MessageExts::ClassMethods
235
+ end
236
+ end
237
+
238
+ # A list of queries to run on a cluster.
239
+ # @!attribute [rw] queries
240
+ # @return [Array<String>]
241
+ # Required. The queries to execute. You do not need to terminate a query
242
+ # with a semicolon. Multiple queries can be specified in one string
243
+ # by separating each with a semicolon. Here is an example of an Cloud
244
+ # Dataproc API snippet that uses a QueryList to specify a HiveJob:
245
+ #
246
+ # "hiveJob": {
247
+ # "queryList": {
248
+ # "queries": [
249
+ # "query1",
250
+ # "query2",
251
+ # "query3;query4",
252
+ # ]
253
+ # }
254
+ # }
255
+ class QueryList
256
+ include Google::Protobuf::MessageExts
257
+ extend Google::Protobuf::MessageExts::ClassMethods
258
+ end
259
+
260
+ # A Dataproc job for running [Apache Hive](https://hive.apache.org/)
261
+ # queries on YARN.
262
+ # @!attribute [rw] query_file_uri
263
+ # @return [String]
264
+ # The HCFS URI of the script that contains Hive queries.
265
+ # @!attribute [rw] query_list
266
+ # @return [Google::Cloud::Dataproc::V1::QueryList]
267
+ # A list of queries.
268
+ # @!attribute [rw] continue_on_failure
269
+ # @return [Boolean]
270
+ # Optional. Whether to continue executing queries if a query fails.
271
+ # The default value is `false`. Setting to `true` can be useful when
272
+ # executing independent parallel queries.
273
+ # @!attribute [rw] script_variables
274
+ # @return [Google::Protobuf::Map{String => String}]
275
+ # Optional. Mapping of query variable names to values (equivalent to the
276
+ # Hive command: `SET name="value";`).
277
+ # @!attribute [rw] properties
278
+ # @return [Google::Protobuf::Map{String => String}]
279
+ # Optional. A mapping of property names and values, used to configure Hive.
280
+ # Properties that conflict with values set by the Dataproc API may be
281
+ # overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
282
+ # /etc/hive/conf/hive-site.xml, and classes in user code.
283
+ # @!attribute [rw] jar_file_uris
284
+ # @return [Array<String>]
285
+ # Optional. HCFS URIs of jar files to add to the CLASSPATH of the
286
+ # Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
287
+ # and UDFs.
288
+ class HiveJob
289
+ include Google::Protobuf::MessageExts
290
+ extend Google::Protobuf::MessageExts::ClassMethods
291
+
292
+ # @!attribute [rw] key
293
+ # @return [String]
294
+ # @!attribute [rw] value
295
+ # @return [String]
296
+ class ScriptVariablesEntry
297
+ include Google::Protobuf::MessageExts
298
+ extend Google::Protobuf::MessageExts::ClassMethods
299
+ end
300
+
301
+ # @!attribute [rw] key
302
+ # @return [String]
303
+ # @!attribute [rw] value
304
+ # @return [String]
305
+ class PropertiesEntry
306
+ include Google::Protobuf::MessageExts
307
+ extend Google::Protobuf::MessageExts::ClassMethods
308
+ end
309
+ end
310
+
311
+ # A Dataproc job for running [Apache Spark
312
+ # SQL](http://spark.apache.org/sql/) queries.
313
+ # @!attribute [rw] query_file_uri
314
+ # @return [String]
315
+ # The HCFS URI of the script that contains SQL queries.
316
+ # @!attribute [rw] query_list
317
+ # @return [Google::Cloud::Dataproc::V1::QueryList]
318
+ # A list of queries.
319
+ # @!attribute [rw] script_variables
320
+ # @return [Google::Protobuf::Map{String => String}]
321
+ # Optional. Mapping of query variable names to values (equivalent to the
322
+ # Spark SQL command: SET `name="value";`).
323
+ # @!attribute [rw] properties
324
+ # @return [Google::Protobuf::Map{String => String}]
325
+ # Optional. A mapping of property names to values, used to configure
326
+ # Spark SQL's SparkConf. Properties that conflict with values set by the
327
+ # Dataproc API may be overwritten.
328
+ # @!attribute [rw] jar_file_uris
329
+ # @return [Array<String>]
330
+ # Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
331
+ # @!attribute [rw] logging_config
332
+ # @return [Google::Cloud::Dataproc::V1::LoggingConfig]
333
+ # Optional. The runtime log config for job execution.
334
+ class SparkSqlJob
335
+ include Google::Protobuf::MessageExts
336
+ extend Google::Protobuf::MessageExts::ClassMethods
337
+
338
+ # @!attribute [rw] key
339
+ # @return [String]
340
+ # @!attribute [rw] value
341
+ # @return [String]
342
+ class ScriptVariablesEntry
343
+ include Google::Protobuf::MessageExts
344
+ extend Google::Protobuf::MessageExts::ClassMethods
345
+ end
346
+
347
+ # @!attribute [rw] key
348
+ # @return [String]
349
+ # @!attribute [rw] value
350
+ # @return [String]
351
+ class PropertiesEntry
352
+ include Google::Protobuf::MessageExts
353
+ extend Google::Protobuf::MessageExts::ClassMethods
354
+ end
355
+ end
356
+
357
+ # A Dataproc job for running [Apache Pig](https://pig.apache.org/)
358
+ # queries on YARN.
359
+ # @!attribute [rw] query_file_uri
360
+ # @return [String]
361
+ # The HCFS URI of the script that contains the Pig queries.
362
+ # @!attribute [rw] query_list
363
+ # @return [Google::Cloud::Dataproc::V1::QueryList]
364
+ # A list of queries.
365
+ # @!attribute [rw] continue_on_failure
366
+ # @return [Boolean]
367
+ # Optional. Whether to continue executing queries if a query fails.
368
+ # The default value is `false`. Setting to `true` can be useful when
369
+ # executing independent parallel queries.
370
+ # @!attribute [rw] script_variables
371
+ # @return [Google::Protobuf::Map{String => String}]
372
+ # Optional. Mapping of query variable names to values (equivalent to the Pig
373
+ # command: `name=[value]`).
374
+ # @!attribute [rw] properties
375
+ # @return [Google::Protobuf::Map{String => String}]
376
+ # Optional. A mapping of property names to values, used to configure Pig.
377
+ # Properties that conflict with values set by the Dataproc API may be
378
+ # overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
379
+ # /etc/pig/conf/pig.properties, and classes in user code.
380
+ # @!attribute [rw] jar_file_uris
381
+ # @return [Array<String>]
382
+ # Optional. HCFS URIs of jar files to add to the CLASSPATH of
383
+ # the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
384
+ # @!attribute [rw] logging_config
385
+ # @return [Google::Cloud::Dataproc::V1::LoggingConfig]
386
+ # Optional. The runtime log config for job execution.
387
+ class PigJob
388
+ include Google::Protobuf::MessageExts
389
+ extend Google::Protobuf::MessageExts::ClassMethods
390
+
391
+ # @!attribute [rw] key
392
+ # @return [String]
393
+ # @!attribute [rw] value
394
+ # @return [String]
395
+ class ScriptVariablesEntry
396
+ include Google::Protobuf::MessageExts
397
+ extend Google::Protobuf::MessageExts::ClassMethods
398
+ end
399
+
400
+ # @!attribute [rw] key
401
+ # @return [String]
402
+ # @!attribute [rw] value
403
+ # @return [String]
404
+ class PropertiesEntry
405
+ include Google::Protobuf::MessageExts
406
+ extend Google::Protobuf::MessageExts::ClassMethods
407
+ end
408
+ end
409
+
410
+ # A Dataproc job for running
411
+ # [Apache SparkR](https://spark.apache.org/docs/latest/sparkr.html)
412
+ # applications on YARN.
413
+ # @!attribute [rw] main_r_file_uri
414
+ # @return [String]
415
+ # Required. The HCFS URI of the main R file to use as the driver.
416
+ # Must be a .R file.
417
+ # @!attribute [rw] args
418
+ # @return [Array<String>]
419
+ # Optional. The arguments to pass to the driver. Do not include arguments,
420
+ # such as `--conf`, that can be set as job properties, since a collision may
421
+ # occur that causes an incorrect job submission.
422
+ # @!attribute [rw] file_uris
423
+ # @return [Array<String>]
424
+ # Optional. HCFS URIs of files to be copied to the working directory of
425
+ # R drivers and distributed tasks. Useful for naively parallel tasks.
426
+ # @!attribute [rw] archive_uris
427
+ # @return [Array<String>]
428
+ # Optional. HCFS URIs of archives to be extracted in the working directory of
429
+ # Spark drivers and tasks. Supported file types:
430
+ # .jar, .tar, .tar.gz, .tgz, and .zip.
431
+ # @!attribute [rw] properties
432
+ # @return [Google::Protobuf::Map{String => String}]
433
+ # Optional. A mapping of property names to values, used to configure SparkR.
434
+ # Properties that conflict with values set by the Dataproc API may be
435
+ # overwritten. Can include properties set in
436
+ # /etc/spark/conf/spark-defaults.conf and classes in user code.
437
+ # @!attribute [rw] logging_config
438
+ # @return [Google::Cloud::Dataproc::V1::LoggingConfig]
439
+ # Optional. The runtime log config for job execution.
440
+ class SparkRJob
441
+ include Google::Protobuf::MessageExts
442
+ extend Google::Protobuf::MessageExts::ClassMethods
443
+
444
+ # @!attribute [rw] key
445
+ # @return [String]
446
+ # @!attribute [rw] value
447
+ # @return [String]
448
+ class PropertiesEntry
449
+ include Google::Protobuf::MessageExts
450
+ extend Google::Protobuf::MessageExts::ClassMethods
451
+ end
452
+ end
453
+
454
+ # A Dataproc job for running [Presto](https://prestosql.io/) queries.
455
+ # **IMPORTANT**: The [Dataproc Presto Optional
456
+ # Component](/dataproc/docs/concepts/components/presto) must be enabled when
457
+ # the cluster is created to submit a Presto job to the cluster.
458
+ # @!attribute [rw] query_file_uri
459
+ # @return [String]
460
+ # The HCFS URI of the script that contains SQL queries.
461
+ # @!attribute [rw] query_list
462
+ # @return [Google::Cloud::Dataproc::V1::QueryList]
463
+ # A list of queries.
464
+ # @!attribute [rw] continue_on_failure
465
+ # @return [Boolean]
466
+ # Optional. Whether to continue executing queries if a query fails.
467
+ # The default value is `false`. Setting to `true` can be useful when
468
+ # executing independent parallel queries.
469
+ # @!attribute [rw] output_format
470
+ # @return [String]
471
+ # Optional. The format in which query output will be displayed. See the
472
+ # Presto documentation for supported output formats
473
+ # @!attribute [rw] client_tags
474
+ # @return [Array<String>]
475
+ # Optional. Presto client tags to attach to this query
476
+ # @!attribute [rw] properties
477
+ # @return [Google::Protobuf::Map{String => String}]
478
+ # Optional. A mapping of property names to values. Used to set Presto
479
+ # [session properties](https://prestodb.io/docs/current/sql/set-session.html)
480
+ # Equivalent to using the --session flag in the Presto CLI
481
+ # @!attribute [rw] logging_config
482
+ # @return [Google::Cloud::Dataproc::V1::LoggingConfig]
483
+ # Optional. The runtime log config for job execution.
484
+ class PrestoJob
485
+ include Google::Protobuf::MessageExts
486
+ extend Google::Protobuf::MessageExts::ClassMethods
487
+
488
+ # @!attribute [rw] key
489
+ # @return [String]
490
+ # @!attribute [rw] value
491
+ # @return [String]
492
+ class PropertiesEntry
493
+ include Google::Protobuf::MessageExts
494
+ extend Google::Protobuf::MessageExts::ClassMethods
495
+ end
496
+ end
497
+
498
+ # Dataproc job config.
499
+ # @!attribute [rw] cluster_name
500
+ # @return [String]
501
+ # Required. The name of the cluster where the job will be submitted.
502
+ # @!attribute [r] cluster_uuid
503
+ # @return [String]
504
+ # Output only. A cluster UUID generated by the Dataproc service when
505
+ # the job is submitted.
506
+ class JobPlacement
507
+ include Google::Protobuf::MessageExts
508
+ extend Google::Protobuf::MessageExts::ClassMethods
509
+ end
510
+
511
+ # Dataproc job status.
512
+ # @!attribute [r] state
513
+ # @return [Google::Cloud::Dataproc::V1::JobStatus::State]
514
+ # Output only. A state message specifying the overall job state.
515
+ # @!attribute [r] details
516
+ # @return [String]
517
+ # Optional. Output only. Job state details, such as an error
518
+ # description if the state is <code>ERROR</code>.
519
+ # @!attribute [r] state_start_time
520
+ # @return [Google::Protobuf::Timestamp]
521
+ # Output only. The time when this state was entered.
522
+ # @!attribute [r] substate
523
+ # @return [Google::Cloud::Dataproc::V1::JobStatus::Substate]
524
+ # Output only. Additional state information, which includes
525
+ # status reported by the agent.
526
+ class JobStatus
527
+ include Google::Protobuf::MessageExts
528
+ extend Google::Protobuf::MessageExts::ClassMethods
529
+
530
+ # The job state.
531
+ module State
532
+ # The job state is unknown.
533
+ STATE_UNSPECIFIED = 0
534
+
535
+ # The job is pending; it has been submitted, but is not yet running.
536
+ PENDING = 1
537
+
538
+ # Job has been received by the service and completed initial setup;
539
+ # it will soon be submitted to the cluster.
540
+ SETUP_DONE = 8
541
+
542
+ # The job is running on the cluster.
543
+ RUNNING = 2
544
+
545
+ # A CancelJob request has been received, but is pending.
546
+ CANCEL_PENDING = 3
547
+
548
+ # Transient in-flight resources have been canceled, and the request to
549
+ # cancel the running job has been issued to the cluster.
550
+ CANCEL_STARTED = 7
551
+
552
+ # The job cancellation was successful.
553
+ CANCELLED = 4
554
+
555
+ # The job has completed successfully.
556
+ DONE = 5
557
+
558
+ # The job has completed, but encountered an error.
559
+ ERROR = 6
560
+
561
+ # Job attempt has failed. The detail field contains failure details for
562
+ # this attempt.
563
+ #
564
+ # Applies to restartable jobs only.
565
+ ATTEMPT_FAILURE = 9
566
+ end
567
+
568
+ # The job substate.
569
+ module Substate
570
+ # The job substate is unknown.
571
+ UNSPECIFIED = 0
572
+
573
+ # The Job is submitted to the agent.
574
+ #
575
+ # Applies to RUNNING state.
576
+ SUBMITTED = 1
577
+
578
+ # The Job has been received and is awaiting execution (it may be waiting
579
+ # for a condition to be met). See the "details" field for the reason for
580
+ # the delay.
581
+ #
582
+ # Applies to RUNNING state.
583
+ QUEUED = 2
584
+
585
+ # The agent-reported status is out of date, which may be caused by a
586
+ # loss of communication between the agent and Dataproc. If the
587
+ # agent does not send a timely update, the job will fail.
588
+ #
589
+ # Applies to RUNNING state.
590
+ STALE_STATUS = 3
591
+ end
592
+ end
593
+
594
+ # Encapsulates the full scoping used to reference a job.
595
+ # @!attribute [rw] project_id
596
+ # @return [String]
597
+ # Required. The ID of the Google Cloud Platform project that the job
598
+ # belongs to.
599
+ # @!attribute [rw] job_id
600
+ # @return [String]
601
+ # Optional. The job ID, which must be unique within the project.
602
+ #
603
+ # The ID must contain only letters (a-z, A-Z), numbers (0-9),
604
+ # underscores (_), or hyphens (-). The maximum length is 100 characters.
605
+ #
606
+ # If not specified by the caller, the job ID will be provided by the server.
607
+ class JobReference
608
+ include Google::Protobuf::MessageExts
609
+ extend Google::Protobuf::MessageExts::ClassMethods
610
+ end
611
+
612
+ # A YARN application created by a job. Application information is a subset of
613
+ # <code>org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto</code>.
614
+ #
615
+ # **Beta Feature**: This report is available for testing purposes only. It may
616
+ # be changed before final release.
617
+ # @!attribute [rw] name
618
+ # @return [String]
619
+ # Required. The application name.
620
+ # @!attribute [rw] state
621
+ # @return [Google::Cloud::Dataproc::V1::YarnApplication::State]
622
+ # Required. The application state.
623
+ # @!attribute [rw] progress
624
+ # @return [Float]
625
+ # Required. The numerical progress of the application, from 1 to 100.
626
+ # @!attribute [rw] tracking_url
627
+ # @return [String]
628
+ # Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or
629
+ # TimelineServer that provides application-specific information. The URL uses
630
+ # the internal hostname, and requires a proxy server for resolution and,
631
+ # possibly, access.
632
+ class YarnApplication
633
+ include Google::Protobuf::MessageExts
634
+ extend Google::Protobuf::MessageExts::ClassMethods
635
+
636
+ # The application state, corresponding to
637
+ # <code>YarnProtos.YarnApplicationStateProto</code>.
638
+ module State
639
+ # Status is unspecified.
640
+ STATE_UNSPECIFIED = 0
641
+
642
+ # Status is NEW.
643
+ NEW = 1
644
+
645
+ # Status is NEW_SAVING.
646
+ NEW_SAVING = 2
647
+
648
+ # Status is SUBMITTED.
649
+ SUBMITTED = 3
650
+
651
+ # Status is ACCEPTED.
652
+ ACCEPTED = 4
653
+
654
+ # Status is RUNNING.
655
+ RUNNING = 5
656
+
657
+ # Status is FINISHED.
658
+ FINISHED = 6
659
+
660
+ # Status is FAILED.
661
+ FAILED = 7
662
+
663
+ # Status is KILLED.
664
+ KILLED = 8
665
+ end
666
+ end
667
+
668
+ # A Dataproc job resource.
669
+ # @!attribute [rw] reference
670
+ # @return [Google::Cloud::Dataproc::V1::JobReference]
671
+ # Optional. The fully qualified reference to the job, which can be used to
672
+ # obtain the equivalent REST path of the job resource. If this property
673
+ # is not specified when a job is created, the server generates a
674
+ # <code>job_id</code>.
675
+ # @!attribute [rw] placement
676
+ # @return [Google::Cloud::Dataproc::V1::JobPlacement]
677
+ # Required. Job information, including how, when, and where to
678
+ # run the job.
679
+ # @!attribute [rw] hadoop_job
680
+ # @return [Google::Cloud::Dataproc::V1::HadoopJob]
681
+ # Optional. Job is a Hadoop job.
682
+ # @!attribute [rw] spark_job
683
+ # @return [Google::Cloud::Dataproc::V1::SparkJob]
684
+ # Optional. Job is a Spark job.
685
+ # @!attribute [rw] pyspark_job
686
+ # @return [Google::Cloud::Dataproc::V1::PySparkJob]
687
+ # Optional. Job is a PySpark job.
688
+ # @!attribute [rw] hive_job
689
+ # @return [Google::Cloud::Dataproc::V1::HiveJob]
690
+ # Optional. Job is a Hive job.
691
+ # @!attribute [rw] pig_job
692
+ # @return [Google::Cloud::Dataproc::V1::PigJob]
693
+ # Optional. Job is a Pig job.
694
+ # @!attribute [rw] spark_r_job
695
+ # @return [Google::Cloud::Dataproc::V1::SparkRJob]
696
+ # Optional. Job is a SparkR job.
697
+ # @!attribute [rw] spark_sql_job
698
+ # @return [Google::Cloud::Dataproc::V1::SparkSqlJob]
699
+ # Optional. Job is a SparkSql job.
700
+ # @!attribute [rw] presto_job
701
+ # @return [Google::Cloud::Dataproc::V1::PrestoJob]
702
+ # Optional. Job is a Presto job.
703
+ # @!attribute [r] status
704
+ # @return [Google::Cloud::Dataproc::V1::JobStatus]
705
+ # Output only. The job status. Additional application-specific
706
+ # status information may be contained in the <code>type_job</code>
707
+ # and <code>yarn_applications</code> fields.
708
+ # @!attribute [r] status_history
709
+ # @return [Array<Google::Cloud::Dataproc::V1::JobStatus>]
710
+ # Output only. The previous job status.
711
+ # @!attribute [r] yarn_applications
712
+ # @return [Array<Google::Cloud::Dataproc::V1::YarnApplication>]
713
+ # Output only. The collection of YARN applications spun up by this job.
714
+ #
715
+ # **Beta** Feature: This report is available for testing purposes only. It
716
+ # may be changed before final release.
717
+ # @!attribute [r] driver_output_resource_uri
718
+ # @return [String]
719
+ # Output only. A URI pointing to the location of the stdout of the job's
720
+ # driver program.
721
+ # @!attribute [r] driver_control_files_uri
722
+ # @return [String]
723
+ # Output only. If present, the location of miscellaneous control files
724
+ # which may be used as part of job setup and handling. If not present,
725
+ # control files may be placed in the same location as `driver_output_uri`.
726
+ # @!attribute [rw] labels
727
+ # @return [Google::Protobuf::Map{String => String}]
728
+ # Optional. The labels to associate with this job.
729
+ # Label **keys** must contain 1 to 63 characters, and must conform to
730
+ # [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
731
+ # Label **values** may be empty, but, if present, must contain 1 to 63
732
+ # characters, and must conform to [RFC
733
+ # 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
734
+ # associated with a job.
735
+ # @!attribute [rw] scheduling
736
+ # @return [Google::Cloud::Dataproc::V1::JobScheduling]
737
+ # Optional. Job scheduling configuration.
738
+ # @!attribute [r] job_uuid
739
+ # @return [String]
740
+ # Output only. A UUID that uniquely identifies a job within the project
741
+ # over time. This is in contrast to a user-settable reference.job_id that
742
+ # may be reused over time.
743
+ # @!attribute [r] done
744
+ # @return [Boolean]
745
+ # Output only. Indicates whether the job is completed. If the value is `false`,
746
+ # the job is still in progress. If `true`, the job is completed, and
747
+ # `status.state` field will indicate if it was successful, failed,
748
+ # or cancelled.
749
+ class Job
750
+ include Google::Protobuf::MessageExts
751
+ extend Google::Protobuf::MessageExts::ClassMethods
752
+
753
+ # @!attribute [rw] key
754
+ # @return [String]
755
+ # @!attribute [rw] value
756
+ # @return [String]
757
+ class LabelsEntry
758
+ include Google::Protobuf::MessageExts
759
+ extend Google::Protobuf::MessageExts::ClassMethods
760
+ end
761
+ end
762
+
763
+ # Job scheduling options.
764
+ # @!attribute [rw] max_failures_per_hour
765
+ # @return [Integer]
766
+ # Optional. Maximum number of times per hour a driver may be restarted as
767
+ # a result of driver terminating with non-zero code before job is
768
+ # reported failed.
769
+ #
770
+ # A job may be reported as thrashing if driver exits with non-zero code
771
+ # 4 times within 10 minute window.
772
+ #
773
+ # Maximum value is 10.
774
+ class JobScheduling
775
+ include Google::Protobuf::MessageExts
776
+ extend Google::Protobuf::MessageExts::ClassMethods
777
+ end
778
+
779
+ # A request to submit a job.
780
+ # @!attribute [rw] project_id
781
+ # @return [String]
782
+ # Required. The ID of the Google Cloud Platform project that the job
783
+ # belongs to.
784
+ # @!attribute [rw] region
785
+ # @return [String]
786
+ # Required. The Dataproc region in which to handle the request.
787
+ # @!attribute [rw] job
788
+ # @return [Google::Cloud::Dataproc::V1::Job]
789
+ # Required. The job resource.
790
+ # @!attribute [rw] request_id
791
+ # @return [String]
792
+ # Optional. A unique id used to identify the request. If the server
793
+ # receives two {Google::Cloud::Dataproc::V1::SubmitJobRequest SubmitJobRequest} requests with the same
794
+ # id, then the second request will be ignored and the
795
+ # first {Google::Cloud::Dataproc::V1::Job Job} created and stored in the backend
796
+ # is returned.
797
+ #
798
+ # It is recommended to always set this value to a
799
+ # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
800
+ #
801
+ # The id must contain only letters (a-z, A-Z), numbers (0-9),
802
+ # underscores (_), and hyphens (-). The maximum length is 40 characters.
803
+ class SubmitJobRequest
804
+ include Google::Protobuf::MessageExts
805
+ extend Google::Protobuf::MessageExts::ClassMethods
806
+ end
807
+
808
+ # Job Operation metadata.
809
+ # @!attribute [r] job_id
810
+ # @return [String]
811
+ # Output only. The job id.
812
+ # @!attribute [r] status
813
+ # @return [Google::Cloud::Dataproc::V1::JobStatus]
814
+ # Output only. Most recent job status.
815
+ # @!attribute [r] operation_type
816
+ # @return [String]
817
+ # Output only. Operation type.
818
+ # @!attribute [r] start_time
819
+ # @return [Google::Protobuf::Timestamp]
820
+ # Output only. Job submission time.
821
+ class JobMetadata
822
+ include Google::Protobuf::MessageExts
823
+ extend Google::Protobuf::MessageExts::ClassMethods
824
+ end
825
+
826
+ # A request to get the resource representation for a job in a project.
827
+ # @!attribute [rw] project_id
828
+ # @return [String]
829
+ # Required. The ID of the Google Cloud Platform project that the job
830
+ # belongs to.
831
+ # @!attribute [rw] region
832
+ # @return [String]
833
+ # Required. The Dataproc region in which to handle the request.
834
+ # @!attribute [rw] job_id
835
+ # @return [String]
836
+ # Required. The job ID.
837
+ class GetJobRequest
838
+ include Google::Protobuf::MessageExts
839
+ extend Google::Protobuf::MessageExts::ClassMethods
840
+ end
841
+
842
+ # A request to list jobs in a project.
843
+ # @!attribute [rw] project_id
844
+ # @return [String]
845
+ # Required. The ID of the Google Cloud Platform project that the job
846
+ # belongs to.
847
+ # @!attribute [rw] region
848
+ # @return [String]
849
+ # Required. The Dataproc region in which to handle the request.
850
+ # @!attribute [rw] page_size
851
+ # @return [Integer]
852
+ # Optional. The number of results to return in each response.
853
+ # @!attribute [rw] page_token
854
+ # @return [String]
855
+ # Optional. The page token, returned by a previous call, to request the
856
+ # next page of results.
857
+ # @!attribute [rw] cluster_name
858
+ # @return [String]
859
+ # Optional. If set, the returned jobs list includes only jobs that were
860
+ # submitted to the named cluster.
861
+ # @!attribute [rw] job_state_matcher
862
+ # @return [Google::Cloud::Dataproc::V1::ListJobsRequest::JobStateMatcher]
863
+ # Optional. Specifies enumerated categories of jobs to list.
864
+ # (default = match ALL jobs).
865
+ #
866
+ # If `filter` is provided, `jobStateMatcher` will be ignored.
867
+ # @!attribute [rw] filter
868
+ # @return [String]
869
+ # Optional. A filter constraining the jobs to list. Filters are
870
+ # case-sensitive and have the following syntax:
871
+ #
872
+ # [field = value] AND [field [= value]] ...
873
+ #
874
+ # where **field** is `status.state` or `labels.[KEY]`, and `[KEY]` is a label
875
+ # key. **value** can be `*` to match all values.
876
+ # `status.state` can be either `ACTIVE` or `NON_ACTIVE`.
877
+ # Only the logical `AND` operator is supported; space-separated items are
878
+ # treated as having an implicit `AND` operator.
879
+ #
880
+ # Example filter:
881
+ #
882
+ # status.state = ACTIVE AND labels.env = staging AND labels.starred = *
883
+ class ListJobsRequest
884
+ include Google::Protobuf::MessageExts
885
+ extend Google::Protobuf::MessageExts::ClassMethods
886
+
887
+ # A matcher that specifies categories of job states.
888
+ module JobStateMatcher
889
+ # Match all jobs, regardless of state.
890
+ ALL = 0
891
+
892
+ # Only match jobs in non-terminal states: PENDING, RUNNING, or
893
+ # CANCEL_PENDING.
894
+ ACTIVE = 1
895
+
896
+ # Only match jobs in terminal states: CANCELLED, DONE, or ERROR.
897
+ NON_ACTIVE = 2
898
+ end
899
+ end
900
+
901
+ # A request to update a job.
902
+ # @!attribute [rw] project_id
903
+ # @return [String]
904
+ # Required. The ID of the Google Cloud Platform project that the job
905
+ # belongs to.
906
+ # @!attribute [rw] region
907
+ # @return [String]
908
+ # Required. The Dataproc region in which to handle the request.
909
+ # @!attribute [rw] job_id
910
+ # @return [String]
911
+ # Required. The job ID.
912
+ # @!attribute [rw] job
913
+ # @return [Google::Cloud::Dataproc::V1::Job]
914
+ # Required. The changes to the job.
915
+ # @!attribute [rw] update_mask
916
+ # @return [Google::Protobuf::FieldMask]
917
+ # Required. Specifies the path, relative to <code>Job</code>, of
918
+ # the field to update. For example, to update the labels of a Job the
919
+ # <code>update_mask</code> parameter would be specified as
920
+ # <code>labels</code>, and the `PATCH` request body would specify the new
921
+ # value. <strong>Note:</strong> Currently, <code>labels</code> is the only
922
+ # field that can be updated.
923
+ class UpdateJobRequest
924
+ include Google::Protobuf::MessageExts
925
+ extend Google::Protobuf::MessageExts::ClassMethods
926
+ end
927
+
928
+ # A list of jobs in a project.
929
+ # @!attribute [r] jobs
930
+ # @return [Array<Google::Cloud::Dataproc::V1::Job>]
931
+ # Output only. Jobs list.
932
+ # @!attribute [rw] next_page_token
933
+ # @return [String]
934
+ # Optional. This token is included in the response if there are more results
935
+ # to fetch. To fetch additional results, provide this value as the
936
+ # `page_token` in a subsequent <code>ListJobsRequest</code>.
937
+ class ListJobsResponse
938
+ include Google::Protobuf::MessageExts
939
+ extend Google::Protobuf::MessageExts::ClassMethods
940
+ end
941
+
942
+ # A request to cancel a job.
943
+ # @!attribute [rw] project_id
944
+ # @return [String]
945
+ # Required. The ID of the Google Cloud Platform project that the job
946
+ # belongs to.
947
+ # @!attribute [rw] region
948
+ # @return [String]
949
+ # Required. The Dataproc region in which to handle the request.
950
+ # @!attribute [rw] job_id
951
+ # @return [String]
952
+ # Required. The job ID.
953
+ class CancelJobRequest
954
+ include Google::Protobuf::MessageExts
955
+ extend Google::Protobuf::MessageExts::ClassMethods
956
+ end
957
+
958
+ # A request to delete a job.
959
+ # @!attribute [rw] project_id
960
+ # @return [String]
961
+ # Required. The ID of the Google Cloud Platform project that the job
962
+ # belongs to.
963
+ # @!attribute [rw] region
964
+ # @return [String]
965
+ # Required. The Dataproc region in which to handle the request.
966
+ # @!attribute [rw] job_id
967
+ # @return [String]
968
+ # Required. The job ID.
969
+ class DeleteJobRequest
970
+ include Google::Protobuf::MessageExts
971
+ extend Google::Protobuf::MessageExts::ClassMethods
972
+ end
973
+ end
974
+ end
975
+ end
976
+ end