google-cloud-dataproc 0.2.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/dataproc.rb +56 -3
  4. data/lib/google/cloud/dataproc/v1.rb +62 -3
  5. data/lib/google/cloud/dataproc/v1/cluster_controller_client.rb +65 -5
  6. data/lib/google/cloud/dataproc/v1/cluster_controller_client_config.json +10 -7
  7. data/lib/google/cloud/dataproc/v1/clusters_pb.rb +11 -0
  8. data/lib/google/cloud/dataproc/v1/clusters_services_pb.rb +3 -2
  9. data/lib/google/cloud/dataproc/v1/credentials.rb +1 -1
  10. data/lib/google/cloud/dataproc/v1/doc/google/cloud/dataproc/v1/clusters.rb +128 -45
  11. data/lib/google/cloud/dataproc/v1/doc/google/cloud/dataproc/v1/jobs.rb +32 -15
  12. data/lib/google/cloud/dataproc/v1/doc/google/cloud/dataproc/v1/workflow_templates.rb +519 -0
  13. data/lib/google/cloud/dataproc/v1/doc/google/longrunning/operations.rb +1 -43
  14. data/lib/google/cloud/dataproc/v1/doc/google/protobuf/any.rb +1 -1
  15. data/lib/google/cloud/dataproc/v1/doc/google/protobuf/duration.rb +1 -1
  16. data/lib/google/cloud/dataproc/v1/doc/google/protobuf/empty.rb +1 -1
  17. data/lib/google/cloud/dataproc/v1/doc/google/protobuf/field_mask.rb +1 -1
  18. data/lib/google/cloud/dataproc/v1/doc/google/protobuf/timestamp.rb +1 -1
  19. data/lib/google/cloud/dataproc/v1/doc/google/rpc/status.rb +1 -1
  20. data/lib/google/cloud/dataproc/v1/job_controller_client.rb +16 -2
  21. data/lib/google/cloud/dataproc/v1/job_controller_client_config.json +9 -6
  22. data/lib/google/cloud/dataproc/v1/jobs_pb.rb +2 -0
  23. data/lib/google/cloud/dataproc/v1/jobs_services_pb.rb +2 -1
  24. data/lib/google/cloud/dataproc/v1/operations_pb.rb +0 -2
  25. data/lib/google/cloud/dataproc/v1/workflow_template_service_client.rb +690 -0
  26. data/lib/google/cloud/dataproc/v1/workflow_template_service_client_config.json +64 -0
  27. data/lib/google/cloud/dataproc/v1/workflow_templates_pb.rb +181 -0
  28. data/lib/google/cloud/dataproc/v1/workflow_templates_services_pb.rb +102 -0
  29. data/lib/google/cloud/dataproc/v1beta2.rb +281 -0
  30. data/lib/google/cloud/dataproc/v1beta2/cluster_controller_client.rb +799 -0
  31. data/lib/google/cloud/dataproc/v1beta2/cluster_controller_client_config.json +59 -0
  32. data/lib/google/cloud/dataproc/v1beta2/clusters_pb.rb +189 -0
  33. data/lib/google/cloud/dataproc/v1beta2/clusters_services_pb.rb +60 -0
  34. data/lib/google/cloud/dataproc/v1beta2/credentials.rb +41 -0
  35. data/lib/google/cloud/dataproc/v1beta2/doc/google/cloud/dataproc/v1beta2/clusters.rb +666 -0
  36. data/lib/google/cloud/dataproc/v1beta2/doc/google/cloud/dataproc/v1beta2/jobs.rb +691 -0
  37. data/lib/google/cloud/dataproc/v1beta2/doc/google/cloud/dataproc/v1beta2/workflow_templates.rb +524 -0
  38. data/lib/google/cloud/dataproc/v1beta2/doc/google/longrunning/operations.rb +51 -0
  39. data/lib/google/cloud/dataproc/v1beta2/doc/google/protobuf/any.rb +130 -0
  40. data/lib/google/cloud/dataproc/v1beta2/doc/google/protobuf/duration.rb +91 -0
  41. data/lib/google/cloud/dataproc/v1beta2/doc/google/protobuf/empty.rb +29 -0
  42. data/lib/google/cloud/dataproc/v1beta2/doc/google/protobuf/field_mask.rb +230 -0
  43. data/lib/google/cloud/dataproc/v1beta2/doc/google/protobuf/timestamp.rb +109 -0
  44. data/lib/google/cloud/dataproc/v1beta2/doc/google/rpc/status.rb +84 -0
  45. data/lib/google/cloud/dataproc/v1beta2/job_controller_client.rb +581 -0
  46. data/lib/google/cloud/dataproc/v1beta2/job_controller_client_config.json +59 -0
  47. data/lib/google/cloud/dataproc/v1beta2/jobs_pb.rb +248 -0
  48. data/lib/google/cloud/dataproc/v1beta2/jobs_services_pb.rb +61 -0
  49. data/lib/google/cloud/dataproc/v1beta2/operations_pb.rb +44 -0
  50. data/lib/google/cloud/dataproc/v1beta2/shared_pb.rb +18 -0
  51. data/lib/google/cloud/dataproc/v1beta2/workflow_template_service_client.rb +698 -0
  52. data/lib/google/cloud/dataproc/v1beta2/workflow_template_service_client_config.json +64 -0
  53. data/lib/google/cloud/dataproc/v1beta2/workflow_templates_pb.rb +183 -0
  54. data/lib/google/cloud/dataproc/v1beta2/workflow_templates_services_pb.rb +102 -0
  55. metadata +36 -5
@@ -0,0 +1,691 @@
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
+ module V1beta2
20
+ # The runtime logging config of the job.
21
+ # @!attribute [rw] driver_log_levels
22
+ # @return [Hash{String => Google::Cloud::Dataproc::V1beta2::LoggingConfig::Level}]
23
+ # The per-package log levels for the driver. This may include
24
+ # "root" package name to configure rootLogger.
25
+ # Examples:
26
+ # 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
27
+ class LoggingConfig
28
+ # The Log4j level for job execution. When running an
29
+ # [Apache Hive](http://hive.apache.org/) job, Cloud
30
+ # Dataproc configures the Hive client to an equivalent verbosity level.
31
+ module Level
32
+ # Level is unspecified. Use default level for log4j.
33
+ LEVEL_UNSPECIFIED = 0
34
+
35
+ # Use ALL level for log4j.
36
+ ALL = 1
37
+
38
+ # Use TRACE level for log4j.
39
+ TRACE = 2
40
+
41
+ # Use DEBUG level for log4j.
42
+ DEBUG = 3
43
+
44
+ # Use INFO level for log4j.
45
+ INFO = 4
46
+
47
+ # Use WARN level for log4j.
48
+ WARN = 5
49
+
50
+ # Use ERROR level for log4j.
51
+ ERROR = 6
52
+
53
+ # Use FATAL level for log4j.
54
+ FATAL = 7
55
+
56
+ # Turn off log4j.
57
+ OFF = 8
58
+ end
59
+ end
60
+
61
+ # A Cloud Dataproc job for running
62
+ # [Apache Hadoop MapReduce](https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html)
63
+ # jobs on [Apache Hadoop YARN](https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html).
64
+ # @!attribute [rw] main_jar_file_uri
65
+ # @return [String]
66
+ # The HCFS URI of the jar file containing the main class.
67
+ # Examples:
68
+ # 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
69
+ # 'hdfs:/tmp/test-samples/custom-wordcount.jar'
70
+ # 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
71
+ # @!attribute [rw] main_class
72
+ # @return [String]
73
+ # The name of the driver's main class. The jar file containing the class
74
+ # must be in the default CLASSPATH or specified in `jar_file_uris`.
75
+ # @!attribute [rw] args
76
+ # @return [Array<String>]
77
+ # Optional. The arguments to pass to the driver. Do not
78
+ # include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as job
79
+ # properties, since a collision may occur that causes an incorrect job
80
+ # submission.
81
+ # @!attribute [rw] jar_file_uris
82
+ # @return [Array<String>]
83
+ # Optional. Jar file URIs to add to the CLASSPATHs of the
84
+ # Hadoop driver and tasks.
85
+ # @!attribute [rw] file_uris
86
+ # @return [Array<String>]
87
+ # Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
88
+ # to the working directory of Hadoop drivers and distributed tasks. Useful
89
+ # for naively parallel tasks.
90
+ # @!attribute [rw] archive_uris
91
+ # @return [Array<String>]
92
+ # Optional. HCFS URIs of archives to be extracted in the working directory of
93
+ # Hadoop drivers and tasks. Supported file types:
94
+ # .jar, .tar, .tar.gz, .tgz, or .zip.
95
+ # @!attribute [rw] properties
96
+ # @return [Hash{String => String}]
97
+ # Optional. A mapping of property names to values, used to configure Hadoop.
98
+ # Properties that conflict with values set by the Cloud Dataproc API may be
99
+ # overwritten. Can include properties set in /etc/hadoop/conf/*-site and
100
+ # classes in user code.
101
+ # @!attribute [rw] logging_config
102
+ # @return [Google::Cloud::Dataproc::V1beta2::LoggingConfig]
103
+ # Optional. The runtime log config for job execution.
104
+ class HadoopJob; end
105
+
106
+ # A Cloud Dataproc job for running [Apache Spark](http://spark.apache.org/)
107
+ # applications on YARN.
108
+ # @!attribute [rw] main_jar_file_uri
109
+ # @return [String]
110
+ # The HCFS URI of the jar file that contains the main class.
111
+ # @!attribute [rw] main_class
112
+ # @return [String]
113
+ # The name of the driver's main class. The jar file that contains the class
114
+ # must be in the default CLASSPATH or specified in `jar_file_uris`.
115
+ # @!attribute [rw] args
116
+ # @return [Array<String>]
117
+ # Optional. The arguments to pass to the driver. Do not include arguments,
118
+ # such as `--conf`, that can be set as job properties, since a collision may
119
+ # occur that causes an incorrect job submission.
120
+ # @!attribute [rw] jar_file_uris
121
+ # @return [Array<String>]
122
+ # Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
123
+ # Spark driver and tasks.
124
+ # @!attribute [rw] file_uris
125
+ # @return [Array<String>]
126
+ # Optional. HCFS URIs of files to be copied to the working directory of
127
+ # Spark drivers and distributed tasks. Useful for naively parallel tasks.
128
+ # @!attribute [rw] archive_uris
129
+ # @return [Array<String>]
130
+ # Optional. HCFS URIs of archives to be extracted in the working directory
131
+ # of Spark drivers and tasks. Supported file types:
132
+ # .jar, .tar, .tar.gz, .tgz, and .zip.
133
+ # @!attribute [rw] properties
134
+ # @return [Hash{String => String}]
135
+ # Optional. A mapping of property names to values, used to configure Spark.
136
+ # Properties that conflict with values set by the Cloud Dataproc API may be
137
+ # overwritten. Can include properties set in
138
+ # /etc/spark/conf/spark-defaults.conf and classes in user code.
139
+ # @!attribute [rw] logging_config
140
+ # @return [Google::Cloud::Dataproc::V1beta2::LoggingConfig]
141
+ # Optional. The runtime log config for job execution.
142
+ class SparkJob; end
143
+
144
+ # A Cloud Dataproc job for running
145
+ # [Apache PySpark](https://spark.apache.org/docs/0.9.0/python-programming-guide.html)
146
+ # applications on YARN.
147
+ # @!attribute [rw] main_python_file_uri
148
+ # @return [String]
149
+ # Required. The HCFS URI of the main Python file to use as the driver. Must
150
+ # be a .py file.
151
+ # @!attribute [rw] args
152
+ # @return [Array<String>]
153
+ # Optional. The arguments to pass to the driver. Do not include arguments,
154
+ # such as `--conf`, that can be set as job properties, since a collision may
155
+ # occur that causes an incorrect job submission.
156
+ # @!attribute [rw] python_file_uris
157
+ # @return [Array<String>]
158
+ # Optional. HCFS file URIs of Python files to pass to the PySpark
159
+ # framework. Supported file types: .py, .egg, and .zip.
160
+ # @!attribute [rw] jar_file_uris
161
+ # @return [Array<String>]
162
+ # Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
163
+ # Python driver and tasks.
164
+ # @!attribute [rw] file_uris
165
+ # @return [Array<String>]
166
+ # Optional. HCFS URIs of files to be copied to the working directory of
167
+ # Python drivers and distributed tasks. Useful for naively parallel tasks.
168
+ # @!attribute [rw] archive_uris
169
+ # @return [Array<String>]
170
+ # Optional. HCFS URIs of archives to be extracted in the working directory of
171
+ # .jar, .tar, .tar.gz, .tgz, and .zip.
172
+ # @!attribute [rw] properties
173
+ # @return [Hash{String => String}]
174
+ # Optional. A mapping of property names to values, used to configure PySpark.
175
+ # Properties that conflict with values set by the Cloud Dataproc API may be
176
+ # overwritten. Can include properties set in
177
+ # /etc/spark/conf/spark-defaults.conf and classes in user code.
178
+ # @!attribute [rw] logging_config
179
+ # @return [Google::Cloud::Dataproc::V1beta2::LoggingConfig]
180
+ # Optional. The runtime log config for job execution.
181
+ class PySparkJob; end
182
+
183
+ # A list of queries to run on a cluster.
184
+ # @!attribute [rw] queries
185
+ # @return [Array<String>]
186
+ # Required. The queries to execute. You do not need to terminate a query
187
+ # with a semicolon. Multiple queries can be specified in one string
188
+ # by separating each with a semicolon. Here is an example of an Cloud
189
+ # Dataproc API snippet that uses a QueryList to specify a HiveJob:
190
+ #
191
+ # "hiveJob": {
192
+ # "queryList": {
193
+ # "queries": [
194
+ # "query1",
195
+ # "query2",
196
+ # "query3;query4",
197
+ # ]
198
+ # }
199
+ # }
200
+ class QueryList; end
201
+
202
+ # A Cloud Dataproc job for running [Apache Hive](https://hive.apache.org/)
203
+ # queries on YARN.
204
+ # @!attribute [rw] query_file_uri
205
+ # @return [String]
206
+ # The HCFS URI of the script that contains Hive queries.
207
+ # @!attribute [rw] query_list
208
+ # @return [Google::Cloud::Dataproc::V1beta2::QueryList]
209
+ # A list of queries.
210
+ # @!attribute [rw] continue_on_failure
211
+ # @return [true, false]
212
+ # Optional. Whether to continue executing queries if a query fails.
213
+ # The default value is `false`. Setting to `true` can be useful when executing
214
+ # independent parallel queries.
215
+ # @!attribute [rw] script_variables
216
+ # @return [Hash{String => String}]
217
+ # Optional. Mapping of query variable names to values (equivalent to the
218
+ # Hive command: `SET name="value";`).
219
+ # @!attribute [rw] properties
220
+ # @return [Hash{String => String}]
221
+ # Optional. A mapping of property names and values, used to configure Hive.
222
+ # Properties that conflict with values set by the Cloud Dataproc API may be
223
+ # overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
224
+ # /etc/hive/conf/hive-site.xml, and classes in user code.
225
+ # @!attribute [rw] jar_file_uris
226
+ # @return [Array<String>]
227
+ # Optional. HCFS URIs of jar files to add to the CLASSPATH of the
228
+ # Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
229
+ # and UDFs.
230
+ class HiveJob; end
231
+
232
+ # A Cloud Dataproc job for running [Apache Spark SQL](http://spark.apache.org/sql/)
233
+ # queries.
234
+ # @!attribute [rw] query_file_uri
235
+ # @return [String]
236
+ # The HCFS URI of the script that contains SQL queries.
237
+ # @!attribute [rw] query_list
238
+ # @return [Google::Cloud::Dataproc::V1beta2::QueryList]
239
+ # A list of queries.
240
+ # @!attribute [rw] script_variables
241
+ # @return [Hash{String => String}]
242
+ # Optional. Mapping of query variable names to values (equivalent to the
243
+ # Spark SQL command: SET `name="value";`).
244
+ # @!attribute [rw] properties
245
+ # @return [Hash{String => String}]
246
+ # Optional. A mapping of property names to values, used to configure
247
+ # Spark SQL's SparkConf. Properties that conflict with values set by the
248
+ # Cloud Dataproc API may be overwritten.
249
+ # @!attribute [rw] jar_file_uris
250
+ # @return [Array<String>]
251
+ # Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
252
+ # @!attribute [rw] logging_config
253
+ # @return [Google::Cloud::Dataproc::V1beta2::LoggingConfig]
254
+ # Optional. The runtime log config for job execution.
255
+ class SparkSqlJob; end
256
+
257
+ # A Cloud Dataproc job for running [Apache Pig](https://pig.apache.org/)
258
+ # queries on YARN.
259
+ # @!attribute [rw] query_file_uri
260
+ # @return [String]
261
+ # The HCFS URI of the script that contains the Pig queries.
262
+ # @!attribute [rw] query_list
263
+ # @return [Google::Cloud::Dataproc::V1beta2::QueryList]
264
+ # A list of queries.
265
+ # @!attribute [rw] continue_on_failure
266
+ # @return [true, false]
267
+ # Optional. Whether to continue executing queries if a query fails.
268
+ # The default value is `false`. Setting to `true` can be useful when executing
269
+ # independent parallel queries.
270
+ # @!attribute [rw] script_variables
271
+ # @return [Hash{String => String}]
272
+ # Optional. Mapping of query variable names to values (equivalent to the Pig
273
+ # command: `name=[value]`).
274
+ # @!attribute [rw] properties
275
+ # @return [Hash{String => String}]
276
+ # Optional. A mapping of property names to values, used to configure Pig.
277
+ # Properties that conflict with values set by the Cloud Dataproc API may be
278
+ # overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
279
+ # /etc/pig/conf/pig.properties, and classes in user code.
280
+ # @!attribute [rw] jar_file_uris
281
+ # @return [Array<String>]
282
+ # Optional. HCFS URIs of jar files to add to the CLASSPATH of
283
+ # the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
284
+ # @!attribute [rw] logging_config
285
+ # @return [Google::Cloud::Dataproc::V1beta2::LoggingConfig]
286
+ # Optional. The runtime log config for job execution.
287
+ class PigJob; end
288
+
289
+ # Cloud Dataproc job config.
290
+ # @!attribute [rw] cluster_name
291
+ # @return [String]
292
+ # Required. The name of the cluster where the job will be submitted.
293
+ # @!attribute [rw] cluster_uuid
294
+ # @return [String]
295
+ # Output only. A cluster UUID generated by the Cloud Dataproc service when
296
+ # the job is submitted.
297
+ class JobPlacement; end
298
+
299
+ # Cloud Dataproc job status.
300
+ # @!attribute [rw] state
301
+ # @return [Google::Cloud::Dataproc::V1beta2::JobStatus::State]
302
+ # Output only. A state message specifying the overall job state.
303
+ # @!attribute [rw] details
304
+ # @return [String]
305
+ # Output only. Optional job state details, such as an error
306
+ # description if the state is <code>ERROR</code>.
307
+ # @!attribute [rw] state_start_time
308
+ # @return [Google::Protobuf::Timestamp]
309
+ # Output only. The time when this state was entered.
310
+ # @!attribute [rw] substate
311
+ # @return [Google::Cloud::Dataproc::V1beta2::JobStatus::Substate]
312
+ # Output only. Additional state information, which includes
313
+ # status reported by the agent.
314
+ class JobStatus
315
+ # The job state.
316
+ module State
317
+ # The job state is unknown.
318
+ STATE_UNSPECIFIED = 0
319
+
320
+ # The job is pending; it has been submitted, but is not yet running.
321
+ PENDING = 1
322
+
323
+ # Job has been received by the service and completed initial setup;
324
+ # it will soon be submitted to the cluster.
325
+ SETUP_DONE = 8
326
+
327
+ # The job is running on the cluster.
328
+ RUNNING = 2
329
+
330
+ # A CancelJob request has been received, but is pending.
331
+ CANCEL_PENDING = 3
332
+
333
+ # Transient in-flight resources have been canceled, and the request to
334
+ # cancel the running job has been issued to the cluster.
335
+ CANCEL_STARTED = 7
336
+
337
+ # The job cancellation was successful.
338
+ CANCELLED = 4
339
+
340
+ # The job has completed successfully.
341
+ DONE = 5
342
+
343
+ # The job has completed, but encountered an error.
344
+ ERROR = 6
345
+
346
+ # Job attempt has failed. The detail field contains failure details for
347
+ # this attempt.
348
+ #
349
+ # Applies to restartable jobs only.
350
+ ATTEMPT_FAILURE = 9
351
+ end
352
+
353
+ # The job substate.
354
+ module Substate
355
+ # The job substate is unknown.
356
+ UNSPECIFIED = 0
357
+
358
+ # The Job is submitted to the agent.
359
+ #
360
+ # Applies to RUNNING state.
361
+ SUBMITTED = 1
362
+
363
+ # The Job has been received and is awaiting execution (it may be waiting
364
+ # for a condition to be met). See the "details" field for the reason for
365
+ # the delay.
366
+ #
367
+ # Applies to RUNNING state.
368
+ QUEUED = 2
369
+
370
+ # The agent-reported status is out of date, which may be caused by a
371
+ # loss of communication between the agent and Cloud Dataproc. If the
372
+ # agent does not send a timely update, the job will fail.
373
+ #
374
+ # Applies to RUNNING state.
375
+ STALE_STATUS = 3
376
+ end
377
+ end
378
+
379
+ # Encapsulates the full scoping used to reference a job.
380
+ # @!attribute [rw] project_id
381
+ # @return [String]
382
+ # Required. The ID of the Google Cloud Platform project that the job
383
+ # belongs to.
384
+ # @!attribute [rw] job_id
385
+ # @return [String]
386
+ # Optional. The job ID, which must be unique within the project. The job ID
387
+ # is generated by the server upon job submission or provided by the user as a
388
+ # means to perform retries without creating duplicate jobs. The ID must
389
+ # contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or
390
+ # hyphens (-). The maximum length is 100 characters.
391
+ class JobReference; end
392
+
393
+ # A YARN application created by a job. Application information is a subset of
394
+ # <code>org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto</code>.
395
+ #
396
+ # **Beta Feature**: This report is available for testing purposes only. It may
397
+ # be changed before final release.
398
+ # @!attribute [rw] name
399
+ # @return [String]
400
+ # Required. The application name.
401
+ # @!attribute [rw] state
402
+ # @return [Google::Cloud::Dataproc::V1beta2::YarnApplication::State]
403
+ # Required. The application state.
404
+ # @!attribute [rw] progress
405
+ # @return [Float]
406
+ # Required. The numerical progress of the application, from 1 to 100.
407
+ # @!attribute [rw] tracking_url
408
+ # @return [String]
409
+ # Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or
410
+ # TimelineServer that provides application-specific information. The URL uses
411
+ # the internal hostname, and requires a proxy server for resolution and,
412
+ # possibly, access.
413
+ class YarnApplication
414
+ # The application state, corresponding to
415
+ # <code>YarnProtos.YarnApplicationStateProto</code>.
416
+ module State
417
+ # Status is unspecified.
418
+ STATE_UNSPECIFIED = 0
419
+
420
+ # Status is NEW.
421
+ NEW = 1
422
+
423
+ # Status is NEW_SAVING.
424
+ NEW_SAVING = 2
425
+
426
+ # Status is SUBMITTED.
427
+ SUBMITTED = 3
428
+
429
+ # Status is ACCEPTED.
430
+ ACCEPTED = 4
431
+
432
+ # Status is RUNNING.
433
+ RUNNING = 5
434
+
435
+ # Status is FINISHED.
436
+ FINISHED = 6
437
+
438
+ # Status is FAILED.
439
+ FAILED = 7
440
+
441
+ # Status is KILLED.
442
+ KILLED = 8
443
+ end
444
+ end
445
+
446
+ # A Cloud Dataproc job resource.
447
+ # @!attribute [rw] reference
448
+ # @return [Google::Cloud::Dataproc::V1beta2::JobReference]
449
+ # Optional. The fully qualified reference to the job, which can be used to
450
+ # obtain the equivalent REST path of the job resource. If this property
451
+ # is not specified when a job is created, the server generates a
452
+ # <code>job_id</code>.
453
+ # @!attribute [rw] placement
454
+ # @return [Google::Cloud::Dataproc::V1beta2::JobPlacement]
455
+ # Required. Job information, including how, when, and where to
456
+ # run the job.
457
+ # @!attribute [rw] hadoop_job
458
+ # @return [Google::Cloud::Dataproc::V1beta2::HadoopJob]
459
+ # Job is a Hadoop job.
460
+ # @!attribute [rw] spark_job
461
+ # @return [Google::Cloud::Dataproc::V1beta2::SparkJob]
462
+ # Job is a Spark job.
463
+ # @!attribute [rw] pyspark_job
464
+ # @return [Google::Cloud::Dataproc::V1beta2::PySparkJob]
465
+ # Job is a Pyspark job.
466
+ # @!attribute [rw] hive_job
467
+ # @return [Google::Cloud::Dataproc::V1beta2::HiveJob]
468
+ # Job is a Hive job.
469
+ # @!attribute [rw] pig_job
470
+ # @return [Google::Cloud::Dataproc::V1beta2::PigJob]
471
+ # Job is a Pig job.
472
+ # @!attribute [rw] spark_sql_job
473
+ # @return [Google::Cloud::Dataproc::V1beta2::SparkSqlJob]
474
+ # Job is a SparkSql job.
475
+ # @!attribute [rw] status
476
+ # @return [Google::Cloud::Dataproc::V1beta2::JobStatus]
477
+ # Output only. The job status. Additional application-specific
478
+ # status information may be contained in the <code>type_job</code>
479
+ # and <code>yarn_applications</code> fields.
480
+ # @!attribute [rw] status_history
481
+ # @return [Array<Google::Cloud::Dataproc::V1beta2::JobStatus>]
482
+ # Output only. The previous job status.
483
+ # @!attribute [rw] yarn_applications
484
+ # @return [Array<Google::Cloud::Dataproc::V1beta2::YarnApplication>]
485
+ # Output only. The collection of YARN applications spun up by this job.
486
+ #
487
+ # **Beta** Feature: This report is available for testing purposes only. It may
488
+ # be changed before final release.
489
+ # @!attribute [rw] submitted_by
490
+ # @return [String]
491
+ # Output only. The email address of the user submitting the job. For jobs
492
+ # submitted on the cluster, the address is <code>username@hostname</code>.
493
+ # @!attribute [rw] driver_output_resource_uri
494
+ # @return [String]
495
+ # Output only. A URI pointing to the location of the stdout of the job's
496
+ # driver program.
497
+ # @!attribute [rw] driver_control_files_uri
498
+ # @return [String]
499
+ # Output only. If present, the location of miscellaneous control files
500
+ # which may be used as part of job setup and handling. If not present,
501
+ # control files may be placed in the same location as `driver_output_uri`.
502
+ # @!attribute [rw] labels
503
+ # @return [Hash{String => String}]
504
+ # Optional. The labels to associate with this job.
505
+ # Label **keys** must contain 1 to 63 characters, and must conform to
506
+ # [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
507
+ # Label **values** may be empty, but, if present, must contain 1 to 63
508
+ # characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
509
+ # No more than 32 labels can be associated with a job.
510
+ # @!attribute [rw] scheduling
511
+ # @return [Google::Cloud::Dataproc::V1beta2::JobScheduling]
512
+ # Optional. Job scheduling configuration.
513
+ # @!attribute [rw] job_uuid
514
+ # @return [String]
515
+ # Output only. A UUID that uniquely identifies a job within the project
516
+ # over time. This is in contrast to a user-settable reference.job_id that
517
+ # may be reused over time.
518
+ class Job; end
519
+
520
+ # Job scheduling options.
521
+ # @!attribute [rw] max_failures_per_hour
522
+ # @return [Integer]
523
+ # Optional. Maximum number of times per hour a driver may be restarted as
524
+ # a result of driver terminating with non-zero code before job is
525
+ # reported failed.
526
+ #
527
+ # A job may be reported as thrashing if driver exits with non-zero code
528
+ # 4 times within 10 minute window.
529
+ #
530
+ # Maximum value is 10.
531
+ class JobScheduling; end
532
+
533
+ # A request to submit a job.
534
+ # @!attribute [rw] project_id
535
+ # @return [String]
536
+ # Required. The ID of the Google Cloud Platform project that the job
537
+ # belongs to.
538
+ # @!attribute [rw] region
539
+ # @return [String]
540
+ # Required. The Cloud Dataproc region in which to handle the request.
541
+ # @!attribute [rw] job
542
+ # @return [Google::Cloud::Dataproc::V1beta2::Job]
543
+ # Required. The job resource.
544
+ # @!attribute [rw] request_id
545
+ # @return [String]
546
+ # Optional. A unique id used to identify the request. If the server
547
+ # receives two {Google::Cloud::Dataproc::V1beta2::SubmitJobRequest SubmitJobRequest} requests with the same
548
+ # id, then the second request will be ignored and the
549
+ # first {Google::Cloud::Dataproc::V1beta2::Job Job} created and stored in the backend
550
+ # is returned.
551
+ #
552
+ # It is recommended to always set this value to a
553
+ # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
554
+ #
555
+ # The id must contain only letters (a-z, A-Z), numbers (0-9),
556
+ # underscores (_), and hyphens (-). The maximum length is 40 characters.
557
+ class SubmitJobRequest; end
558
+
559
+ # A request to get the resource representation for a job in a project.
560
+ # @!attribute [rw] project_id
561
+ # @return [String]
562
+ # Required. The ID of the Google Cloud Platform project that the job
563
+ # belongs to.
564
+ # @!attribute [rw] region
565
+ # @return [String]
566
+ # Required. The Cloud Dataproc region in which to handle the request.
567
+ # @!attribute [rw] job_id
568
+ # @return [String]
569
+ # Required. The job ID.
570
+ class GetJobRequest; end
571
+
572
+ # A request to list jobs in a project.
573
+ # @!attribute [rw] project_id
574
+ # @return [String]
575
+ # Required. The ID of the Google Cloud Platform project that the job
576
+ # belongs to.
577
+ # @!attribute [rw] region
578
+ # @return [String]
579
+ # Required. The Cloud Dataproc region in which to handle the request.
580
+ # @!attribute [rw] page_size
581
+ # @return [Integer]
582
+ # Optional. The number of results to return in each response.
583
+ # @!attribute [rw] page_token
584
+ # @return [String]
585
+ # Optional. The page token, returned by a previous call, to request the
586
+ # next page of results.
587
+ # @!attribute [rw] cluster_name
588
+ # @return [String]
589
+ # Optional. If set, the returned jobs list includes only jobs that were
590
+ # submitted to the named cluster.
591
+ # @!attribute [rw] job_state_matcher
592
+ # @return [Google::Cloud::Dataproc::V1beta2::ListJobsRequest::JobStateMatcher]
593
+ # Optional. Specifies enumerated categories of jobs to list.
594
+ # (default = match ALL jobs).
595
+ #
596
+ # If `filter` is provided, `jobStateMatcher` will be ignored.
597
+ # @!attribute [rw] filter
598
+ # @return [String]
599
+ # Optional. A filter constraining the jobs to list. Filters are
600
+ # case-sensitive and have the following syntax:
601
+ #
602
+ # [field = value] AND [field [= value]] ...
603
+ #
604
+ # where **field** is `status.state` or `labels.[KEY]`, and `[KEY]` is a label
605
+ # key. **value** can be `*` to match all values.
606
+ # `status.state` can be either `ACTIVE` or `NON_ACTIVE`.
607
+ # Only the logical `AND` operator is supported; space-separated items are
608
+ # treated as having an implicit `AND` operator.
609
+ #
610
+ # Example filter:
611
+ #
612
+ # status.state = ACTIVE AND labels.env = staging AND labels.starred = *
613
+ class ListJobsRequest
614
+ # A matcher that specifies categories of job states.
615
+ module JobStateMatcher
616
+ # Match all jobs, regardless of state.
617
+ ALL = 0
618
+
619
+ # Only match jobs in non-terminal states: PENDING, RUNNING, or
620
+ # CANCEL_PENDING.
621
+ ACTIVE = 1
622
+
623
+ # Only match jobs in terminal states: CANCELLED, DONE, or ERROR.
624
+ NON_ACTIVE = 2
625
+ end
626
+ end
627
+
628
+ # A request to update a job.
629
+ # @!attribute [rw] project_id
630
+ # @return [String]
631
+ # Required. The ID of the Google Cloud Platform project that the job
632
+ # belongs to.
633
+ # @!attribute [rw] region
634
+ # @return [String]
635
+ # Required. The Cloud Dataproc region in which to handle the request.
636
+ # @!attribute [rw] job_id
637
+ # @return [String]
638
+ # Required. The job ID.
639
+ # @!attribute [rw] job
640
+ # @return [Google::Cloud::Dataproc::V1beta2::Job]
641
+ # Required. The changes to the job.
642
+ # @!attribute [rw] update_mask
643
+ # @return [Google::Protobuf::FieldMask]
644
+ # Required. Specifies the path, relative to <code>Job</code>, of
645
+ # the field to update. For example, to update the labels of a Job the
646
+ # <code>update_mask</code> parameter would be specified as
647
+ # <code>labels</code>, and the `PATCH` request body would specify the new
648
+ # value. <strong>Note:</strong> Currently, <code>labels</code> is the only
649
+ # field that can be updated.
650
+ class UpdateJobRequest; end
651
+
652
+ # A list of jobs in a project.
653
+ # @!attribute [rw] jobs
654
+ # @return [Array<Google::Cloud::Dataproc::V1beta2::Job>]
655
+ # Output only. Jobs list.
656
+ # @!attribute [rw] next_page_token
657
+ # @return [String]
658
+ # Optional. This token is included in the response if there are more results
659
+ # to fetch. To fetch additional results, provide this value as the
660
+ # `page_token` in a subsequent <code>ListJobsRequest</code>.
661
+ class ListJobsResponse; end
662
+
663
+ # A request to cancel a job.
664
+ # @!attribute [rw] project_id
665
+ # @return [String]
666
+ # Required. The ID of the Google Cloud Platform project that the job
667
+ # belongs to.
668
+ # @!attribute [rw] region
669
+ # @return [String]
670
+ # Required. The Cloud Dataproc region in which to handle the request.
671
+ # @!attribute [rw] job_id
672
+ # @return [String]
673
+ # Required. The job ID.
674
+ class CancelJobRequest; end
675
+
676
+ # A request to delete a job.
677
+ # @!attribute [rw] project_id
678
+ # @return [String]
679
+ # Required. The ID of the Google Cloud Platform project that the job
680
+ # belongs to.
681
+ # @!attribute [rw] region
682
+ # @return [String]
683
+ # Required. The Cloud Dataproc region in which to handle the request.
684
+ # @!attribute [rw] job_id
685
+ # @return [String]
686
+ # Required. The job ID.
687
+ class DeleteJobRequest; end
688
+ end
689
+ end
690
+ end
691
+ end