/
jobs.pb.go
3131 lines (2822 loc) · 111 KB
/
jobs.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/dataproc/v1beta2/jobs.proto
package dataproc
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
context "golang.org/x/net/context"
_ "google.golang.org/genproto/googleapis/api/annotations"
field_mask "google.golang.org/genproto/protobuf/field_mask"
grpc "google.golang.org/grpc"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// The Log4j level for job execution. When running an
// [Apache Hive](http://hive.apache.org/) job, Cloud
// Dataproc configures the Hive client to an equivalent verbosity level.
type LoggingConfig_Level int32
const (
// Level is unspecified. Use default level for log4j.
LoggingConfig_LEVEL_UNSPECIFIED LoggingConfig_Level = 0
// Use ALL level for log4j.
LoggingConfig_ALL LoggingConfig_Level = 1
// Use TRACE level for log4j.
LoggingConfig_TRACE LoggingConfig_Level = 2
// Use DEBUG level for log4j.
LoggingConfig_DEBUG LoggingConfig_Level = 3
// Use INFO level for log4j.
LoggingConfig_INFO LoggingConfig_Level = 4
// Use WARN level for log4j.
LoggingConfig_WARN LoggingConfig_Level = 5
// Use ERROR level for log4j.
LoggingConfig_ERROR LoggingConfig_Level = 6
// Use FATAL level for log4j.
LoggingConfig_FATAL LoggingConfig_Level = 7
// Turn off log4j.
LoggingConfig_OFF LoggingConfig_Level = 8
)
var LoggingConfig_Level_name = map[int32]string{
0: "LEVEL_UNSPECIFIED",
1: "ALL",
2: "TRACE",
3: "DEBUG",
4: "INFO",
5: "WARN",
6: "ERROR",
7: "FATAL",
8: "OFF",
}
var LoggingConfig_Level_value = map[string]int32{
"LEVEL_UNSPECIFIED": 0,
"ALL": 1,
"TRACE": 2,
"DEBUG": 3,
"INFO": 4,
"WARN": 5,
"ERROR": 6,
"FATAL": 7,
"OFF": 8,
}
func (x LoggingConfig_Level) String() string {
return proto.EnumName(LoggingConfig_Level_name, int32(x))
}
func (LoggingConfig_Level) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_20fb118582e1d7de, []int{0, 0}
}
// The job state.
type JobStatus_State int32
const (
// The job state is unknown.
JobStatus_STATE_UNSPECIFIED JobStatus_State = 0
// The job is pending; it has been submitted, but is not yet running.
JobStatus_PENDING JobStatus_State = 1
// Job has been received by the service and completed initial setup;
// it will soon be submitted to the cluster.
JobStatus_SETUP_DONE JobStatus_State = 8
// The job is running on the cluster.
JobStatus_RUNNING JobStatus_State = 2
// A CancelJob request has been received, but is pending.
JobStatus_CANCEL_PENDING JobStatus_State = 3
// Transient in-flight resources have been canceled, and the request to
// cancel the running job has been issued to the cluster.
JobStatus_CANCEL_STARTED JobStatus_State = 7
// The job cancellation was successful.
JobStatus_CANCELLED JobStatus_State = 4
// The job has completed successfully.
JobStatus_DONE JobStatus_State = 5
// The job has completed, but encountered an error.
JobStatus_ERROR JobStatus_State = 6
// Job attempt has failed. The detail field contains failure details for
// this attempt.
//
// Applies to restartable jobs only.
JobStatus_ATTEMPT_FAILURE JobStatus_State = 9
)
var JobStatus_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "PENDING",
8: "SETUP_DONE",
2: "RUNNING",
3: "CANCEL_PENDING",
7: "CANCEL_STARTED",
4: "CANCELLED",
5: "DONE",
6: "ERROR",
9: "ATTEMPT_FAILURE",
}
var JobStatus_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"PENDING": 1,
"SETUP_DONE": 8,
"RUNNING": 2,
"CANCEL_PENDING": 3,
"CANCEL_STARTED": 7,
"CANCELLED": 4,
"DONE": 5,
"ERROR": 6,
"ATTEMPT_FAILURE": 9,
}
func (x JobStatus_State) String() string {
return proto.EnumName(JobStatus_State_name, int32(x))
}
func (JobStatus_State) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_20fb118582e1d7de, []int{9, 0}
}
// The job substate.
type JobStatus_Substate int32
const (
// The job substate is unknown.
JobStatus_UNSPECIFIED JobStatus_Substate = 0
// The Job is submitted to the agent.
//
// Applies to RUNNING state.
JobStatus_SUBMITTED JobStatus_Substate = 1
// The Job has been received and is awaiting execution (it may be waiting
// for a condition to be met). See the "details" field for the reason for
// the delay.
//
// Applies to RUNNING state.
JobStatus_QUEUED JobStatus_Substate = 2
// The agent-reported status is out of date, which may be caused by a
// loss of communication between the agent and Cloud Dataproc. If the
// agent does not send a timely update, the job will fail.
//
// Applies to RUNNING state.
JobStatus_STALE_STATUS JobStatus_Substate = 3
)
var JobStatus_Substate_name = map[int32]string{
0: "UNSPECIFIED",
1: "SUBMITTED",
2: "QUEUED",
3: "STALE_STATUS",
}
var JobStatus_Substate_value = map[string]int32{
"UNSPECIFIED": 0,
"SUBMITTED": 1,
"QUEUED": 2,
"STALE_STATUS": 3,
}
func (x JobStatus_Substate) String() string {
return proto.EnumName(JobStatus_Substate_name, int32(x))
}
func (JobStatus_Substate) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_20fb118582e1d7de, []int{9, 1}
}
// The application state, corresponding to
// <code>YarnProtos.YarnApplicationStateProto</code>.
type YarnApplication_State int32
const (
// Status is unspecified.
YarnApplication_STATE_UNSPECIFIED YarnApplication_State = 0
// Status is NEW.
YarnApplication_NEW YarnApplication_State = 1
// Status is NEW_SAVING.
YarnApplication_NEW_SAVING YarnApplication_State = 2
// Status is SUBMITTED.
YarnApplication_SUBMITTED YarnApplication_State = 3
// Status is ACCEPTED.
YarnApplication_ACCEPTED YarnApplication_State = 4
// Status is RUNNING.
YarnApplication_RUNNING YarnApplication_State = 5
// Status is FINISHED.
YarnApplication_FINISHED YarnApplication_State = 6
// Status is FAILED.
YarnApplication_FAILED YarnApplication_State = 7
// Status is KILLED.
YarnApplication_KILLED YarnApplication_State = 8
)
var YarnApplication_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "NEW",
2: "NEW_SAVING",
3: "SUBMITTED",
4: "ACCEPTED",
5: "RUNNING",
6: "FINISHED",
7: "FAILED",
8: "KILLED",
}
var YarnApplication_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"NEW": 1,
"NEW_SAVING": 2,
"SUBMITTED": 3,
"ACCEPTED": 4,
"RUNNING": 5,
"FINISHED": 6,
"FAILED": 7,
"KILLED": 8,
}
func (x YarnApplication_State) String() string {
return proto.EnumName(YarnApplication_State_name, int32(x))
}
func (YarnApplication_State) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_20fb118582e1d7de, []int{11, 0}
}
// A matcher that specifies categories of job states.
type ListJobsRequest_JobStateMatcher int32
const (
// Match all jobs, regardless of state.
ListJobsRequest_ALL ListJobsRequest_JobStateMatcher = 0
// Only match jobs in non-terminal states: PENDING, RUNNING, or
// CANCEL_PENDING.
ListJobsRequest_ACTIVE ListJobsRequest_JobStateMatcher = 1
// Only match jobs in terminal states: CANCELLED, DONE, or ERROR.
ListJobsRequest_NON_ACTIVE ListJobsRequest_JobStateMatcher = 2
)
var ListJobsRequest_JobStateMatcher_name = map[int32]string{
0: "ALL",
1: "ACTIVE",
2: "NON_ACTIVE",
}
var ListJobsRequest_JobStateMatcher_value = map[string]int32{
"ALL": 0,
"ACTIVE": 1,
"NON_ACTIVE": 2,
}
func (x ListJobsRequest_JobStateMatcher) String() string {
return proto.EnumName(ListJobsRequest_JobStateMatcher_name, int32(x))
}
func (ListJobsRequest_JobStateMatcher) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_20fb118582e1d7de, []int{16, 0}
}
// The runtime logging config of the job.
type LoggingConfig struct {
// The per-package log levels for the driver. This may include
// "root" package name to configure rootLogger.
// Examples:
// 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
DriverLogLevels map[string]LoggingConfig_Level `protobuf:"bytes,2,rep,name=driver_log_levels,json=driverLogLevels,proto3" json:"driver_log_levels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=google.cloud.dataproc.v1beta2.LoggingConfig_Level"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *LoggingConfig) Reset() { *m = LoggingConfig{} }
func (m *LoggingConfig) String() string { return proto.CompactTextString(m) }
func (*LoggingConfig) ProtoMessage() {}
func (*LoggingConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_20fb118582e1d7de, []int{0}
}
func (m *LoggingConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LoggingConfig.Unmarshal(m, b)
}
func (m *LoggingConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_LoggingConfig.Marshal(b, m, deterministic)
}
func (m *LoggingConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_LoggingConfig.Merge(m, src)
}
func (m *LoggingConfig) XXX_Size() int {
return xxx_messageInfo_LoggingConfig.Size(m)
}
func (m *LoggingConfig) XXX_DiscardUnknown() {
xxx_messageInfo_LoggingConfig.DiscardUnknown(m)
}
var xxx_messageInfo_LoggingConfig proto.InternalMessageInfo
func (m *LoggingConfig) GetDriverLogLevels() map[string]LoggingConfig_Level {
if m != nil {
return m.DriverLogLevels
}
return nil
}
// A Cloud Dataproc job for running
// [Apache Hadoop MapReduce](https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html)
// jobs on [Apache Hadoop YARN](https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html).
type HadoopJob struct {
// Required. Indicates the location of the driver's main class. Specify
// either the jar file that contains the main class or the main class name.
// To specify both, add the jar file to `jar_file_uris`, and then specify
// the main class name in this property.
//
// Types that are valid to be assigned to Driver:
// *HadoopJob_MainJarFileUri
// *HadoopJob_MainClass
Driver isHadoopJob_Driver `protobuf_oneof:"driver"`
// Optional. The arguments to pass to the driver. Do not
// include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as job
// properties, since a collision may occur that causes an incorrect job
// submission.
Args []string `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
// Optional. Jar file URIs to add to the CLASSPATHs of the
// Hadoop driver and tasks.
JarFileUris []string `protobuf:"bytes,4,rep,name=jar_file_uris,json=jarFileUris,proto3" json:"jar_file_uris,omitempty"`
// Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
// to the working directory of Hadoop drivers and distributed tasks. Useful
// for naively parallel tasks.
FileUris []string `protobuf:"bytes,5,rep,name=file_uris,json=fileUris,proto3" json:"file_uris,omitempty"`
// Optional. HCFS URIs of archives to be extracted in the working directory of
// Hadoop drivers and tasks. Supported file types:
// .jar, .tar, .tar.gz, .tgz, or .zip.
ArchiveUris []string `protobuf:"bytes,6,rep,name=archive_uris,json=archiveUris,proto3" json:"archive_uris,omitempty"`
// Optional. A mapping of property names to values, used to configure Hadoop.
// Properties that conflict with values set by the Cloud Dataproc API may be
// overwritten. Can include properties set in /etc/hadoop/conf/*-site and
// classes in user code.
Properties map[string]string `protobuf:"bytes,7,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Optional. The runtime log config for job execution.
LoggingConfig *LoggingConfig `protobuf:"bytes,8,opt,name=logging_config,json=loggingConfig,proto3" json:"logging_config,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *HadoopJob) Reset() { *m = HadoopJob{} }
func (m *HadoopJob) String() string { return proto.CompactTextString(m) }
func (*HadoopJob) ProtoMessage() {}
func (*HadoopJob) Descriptor() ([]byte, []int) {
return fileDescriptor_20fb118582e1d7de, []int{1}
}
func (m *HadoopJob) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_HadoopJob.Unmarshal(m, b)
}
func (m *HadoopJob) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_HadoopJob.Marshal(b, m, deterministic)
}
func (m *HadoopJob) XXX_Merge(src proto.Message) {
xxx_messageInfo_HadoopJob.Merge(m, src)
}
func (m *HadoopJob) XXX_Size() int {
return xxx_messageInfo_HadoopJob.Size(m)
}
func (m *HadoopJob) XXX_DiscardUnknown() {
xxx_messageInfo_HadoopJob.DiscardUnknown(m)
}
var xxx_messageInfo_HadoopJob proto.InternalMessageInfo
type isHadoopJob_Driver interface {
isHadoopJob_Driver()
}
type HadoopJob_MainJarFileUri struct {
MainJarFileUri string `protobuf:"bytes,1,opt,name=main_jar_file_uri,json=mainJarFileUri,proto3,oneof"`
}
type HadoopJob_MainClass struct {
MainClass string `protobuf:"bytes,2,opt,name=main_class,json=mainClass,proto3,oneof"`
}
func (*HadoopJob_MainJarFileUri) isHadoopJob_Driver() {}
func (*HadoopJob_MainClass) isHadoopJob_Driver() {}
func (m *HadoopJob) GetDriver() isHadoopJob_Driver {
if m != nil {
return m.Driver
}
return nil
}
func (m *HadoopJob) GetMainJarFileUri() string {
if x, ok := m.GetDriver().(*HadoopJob_MainJarFileUri); ok {
return x.MainJarFileUri
}
return ""
}
func (m *HadoopJob) GetMainClass() string {
if x, ok := m.GetDriver().(*HadoopJob_MainClass); ok {
return x.MainClass
}
return ""
}
func (m *HadoopJob) GetArgs() []string {
if m != nil {
return m.Args
}
return nil
}
func (m *HadoopJob) GetJarFileUris() []string {
if m != nil {
return m.JarFileUris
}
return nil
}
func (m *HadoopJob) GetFileUris() []string {
if m != nil {
return m.FileUris
}
return nil
}
func (m *HadoopJob) GetArchiveUris() []string {
if m != nil {
return m.ArchiveUris
}
return nil
}
func (m *HadoopJob) GetProperties() map[string]string {
if m != nil {
return m.Properties
}
return nil
}
func (m *HadoopJob) GetLoggingConfig() *LoggingConfig {
if m != nil {
return m.LoggingConfig
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*HadoopJob) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _HadoopJob_OneofMarshaler, _HadoopJob_OneofUnmarshaler, _HadoopJob_OneofSizer, []interface{}{
(*HadoopJob_MainJarFileUri)(nil),
(*HadoopJob_MainClass)(nil),
}
}
func _HadoopJob_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*HadoopJob)
// driver
switch x := m.Driver.(type) {
case *HadoopJob_MainJarFileUri:
b.EncodeVarint(1<<3 | proto.WireBytes)
b.EncodeStringBytes(x.MainJarFileUri)
case *HadoopJob_MainClass:
b.EncodeVarint(2<<3 | proto.WireBytes)
b.EncodeStringBytes(x.MainClass)
case nil:
default:
return fmt.Errorf("HadoopJob.Driver has unexpected type %T", x)
}
return nil
}
func _HadoopJob_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*HadoopJob)
switch tag {
case 1: // driver.main_jar_file_uri
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.Driver = &HadoopJob_MainJarFileUri{x}
return true, err
case 2: // driver.main_class
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.Driver = &HadoopJob_MainClass{x}
return true, err
default:
return false, nil
}
}
func _HadoopJob_OneofSizer(msg proto.Message) (n int) {
m := msg.(*HadoopJob)
// driver
switch x := m.Driver.(type) {
case *HadoopJob_MainJarFileUri:
n += 1 // tag and wire
n += proto.SizeVarint(uint64(len(x.MainJarFileUri)))
n += len(x.MainJarFileUri)
case *HadoopJob_MainClass:
n += 1 // tag and wire
n += proto.SizeVarint(uint64(len(x.MainClass)))
n += len(x.MainClass)
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// A Cloud Dataproc job for running [Apache Spark](http://spark.apache.org/)
// applications on YARN.
type SparkJob struct {
// Required. The specification of the main method to call to drive the job.
// Specify either the jar file that contains the main class or the main class
// name. To pass both a main jar and a main class in that jar, add the jar to
// `CommonJob.jar_file_uris`, and then specify the main class name in `main_class`.
//
// Types that are valid to be assigned to Driver:
// *SparkJob_MainJarFileUri
// *SparkJob_MainClass
Driver isSparkJob_Driver `protobuf_oneof:"driver"`
// Optional. The arguments to pass to the driver. Do not include arguments,
// such as `--conf`, that can be set as job properties, since a collision may
// occur that causes an incorrect job submission.
Args []string `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
// Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
// Spark driver and tasks.
JarFileUris []string `protobuf:"bytes,4,rep,name=jar_file_uris,json=jarFileUris,proto3" json:"jar_file_uris,omitempty"`
// Optional. HCFS URIs of files to be copied to the working directory of
// Spark drivers and distributed tasks. Useful for naively parallel tasks.
FileUris []string `protobuf:"bytes,5,rep,name=file_uris,json=fileUris,proto3" json:"file_uris,omitempty"`
// Optional. HCFS URIs of archives to be extracted in the working directory
// of Spark drivers and tasks. Supported file types:
// .jar, .tar, .tar.gz, .tgz, and .zip.
ArchiveUris []string `protobuf:"bytes,6,rep,name=archive_uris,json=archiveUris,proto3" json:"archive_uris,omitempty"`
// Optional. A mapping of property names to values, used to configure Spark.
// Properties that conflict with values set by the Cloud Dataproc API may be
// overwritten. Can include properties set in
// /etc/spark/conf/spark-defaults.conf and classes in user code.
Properties map[string]string `protobuf:"bytes,7,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Optional. The runtime log config for job execution.
LoggingConfig *LoggingConfig `protobuf:"bytes,8,opt,name=logging_config,json=loggingConfig,proto3" json:"logging_config,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SparkJob) Reset() { *m = SparkJob{} }
func (m *SparkJob) String() string { return proto.CompactTextString(m) }
func (*SparkJob) ProtoMessage() {}
func (*SparkJob) Descriptor() ([]byte, []int) {
return fileDescriptor_20fb118582e1d7de, []int{2}
}
func (m *SparkJob) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SparkJob.Unmarshal(m, b)
}
func (m *SparkJob) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SparkJob.Marshal(b, m, deterministic)
}
func (m *SparkJob) XXX_Merge(src proto.Message) {
xxx_messageInfo_SparkJob.Merge(m, src)
}
func (m *SparkJob) XXX_Size() int {
return xxx_messageInfo_SparkJob.Size(m)
}
func (m *SparkJob) XXX_DiscardUnknown() {
xxx_messageInfo_SparkJob.DiscardUnknown(m)
}
var xxx_messageInfo_SparkJob proto.InternalMessageInfo
type isSparkJob_Driver interface {
isSparkJob_Driver()
}
type SparkJob_MainJarFileUri struct {
MainJarFileUri string `protobuf:"bytes,1,opt,name=main_jar_file_uri,json=mainJarFileUri,proto3,oneof"`
}
type SparkJob_MainClass struct {
MainClass string `protobuf:"bytes,2,opt,name=main_class,json=mainClass,proto3,oneof"`
}
func (*SparkJob_MainJarFileUri) isSparkJob_Driver() {}
func (*SparkJob_MainClass) isSparkJob_Driver() {}
func (m *SparkJob) GetDriver() isSparkJob_Driver {
if m != nil {
return m.Driver
}
return nil
}
func (m *SparkJob) GetMainJarFileUri() string {
if x, ok := m.GetDriver().(*SparkJob_MainJarFileUri); ok {
return x.MainJarFileUri
}
return ""
}
func (m *SparkJob) GetMainClass() string {
if x, ok := m.GetDriver().(*SparkJob_MainClass); ok {
return x.MainClass
}
return ""
}
func (m *SparkJob) GetArgs() []string {
if m != nil {
return m.Args
}
return nil
}
func (m *SparkJob) GetJarFileUris() []string {
if m != nil {
return m.JarFileUris
}
return nil
}
func (m *SparkJob) GetFileUris() []string {
if m != nil {
return m.FileUris
}
return nil
}
func (m *SparkJob) GetArchiveUris() []string {
if m != nil {
return m.ArchiveUris
}
return nil
}
func (m *SparkJob) GetProperties() map[string]string {
if m != nil {
return m.Properties
}
return nil
}
func (m *SparkJob) GetLoggingConfig() *LoggingConfig {
if m != nil {
return m.LoggingConfig
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*SparkJob) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _SparkJob_OneofMarshaler, _SparkJob_OneofUnmarshaler, _SparkJob_OneofSizer, []interface{}{
(*SparkJob_MainJarFileUri)(nil),
(*SparkJob_MainClass)(nil),
}
}
func _SparkJob_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*SparkJob)
// driver
switch x := m.Driver.(type) {
case *SparkJob_MainJarFileUri:
b.EncodeVarint(1<<3 | proto.WireBytes)
b.EncodeStringBytes(x.MainJarFileUri)
case *SparkJob_MainClass:
b.EncodeVarint(2<<3 | proto.WireBytes)
b.EncodeStringBytes(x.MainClass)
case nil:
default:
return fmt.Errorf("SparkJob.Driver has unexpected type %T", x)
}
return nil
}
func _SparkJob_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*SparkJob)
switch tag {
case 1: // driver.main_jar_file_uri
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.Driver = &SparkJob_MainJarFileUri{x}
return true, err
case 2: // driver.main_class
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.Driver = &SparkJob_MainClass{x}
return true, err
default:
return false, nil
}
}
func _SparkJob_OneofSizer(msg proto.Message) (n int) {
m := msg.(*SparkJob)
// driver
switch x := m.Driver.(type) {
case *SparkJob_MainJarFileUri:
n += 1 // tag and wire
n += proto.SizeVarint(uint64(len(x.MainJarFileUri)))
n += len(x.MainJarFileUri)
case *SparkJob_MainClass:
n += 1 // tag and wire
n += proto.SizeVarint(uint64(len(x.MainClass)))
n += len(x.MainClass)
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// A Cloud Dataproc job for running
// [Apache PySpark](https://spark.apache.org/docs/0.9.0/python-programming-guide.html)
// applications on YARN.
type PySparkJob struct {
// Required. The HCFS URI of the main Python file to use as the driver. Must
// be a .py file.
MainPythonFileUri string `protobuf:"bytes,1,opt,name=main_python_file_uri,json=mainPythonFileUri,proto3" json:"main_python_file_uri,omitempty"`
// Optional. The arguments to pass to the driver. Do not include arguments,
// such as `--conf`, that can be set as job properties, since a collision may
// occur that causes an incorrect job submission.
Args []string `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"`
// Optional. HCFS file URIs of Python files to pass to the PySpark
// framework. Supported file types: .py, .egg, and .zip.
PythonFileUris []string `protobuf:"bytes,3,rep,name=python_file_uris,json=pythonFileUris,proto3" json:"python_file_uris,omitempty"`
// Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
// Python driver and tasks.
JarFileUris []string `protobuf:"bytes,4,rep,name=jar_file_uris,json=jarFileUris,proto3" json:"jar_file_uris,omitempty"`
// Optional. HCFS URIs of files to be copied to the working directory of
// Python drivers and distributed tasks. Useful for naively parallel tasks.
FileUris []string `protobuf:"bytes,5,rep,name=file_uris,json=fileUris,proto3" json:"file_uris,omitempty"`
// Optional. HCFS URIs of archives to be extracted in the working directory of
// .jar, .tar, .tar.gz, .tgz, and .zip.
ArchiveUris []string `protobuf:"bytes,6,rep,name=archive_uris,json=archiveUris,proto3" json:"archive_uris,omitempty"`
// Optional. A mapping of property names to values, used to configure PySpark.
// Properties that conflict with values set by the Cloud Dataproc API may be
// overwritten. Can include properties set in
// /etc/spark/conf/spark-defaults.conf and classes in user code.
Properties map[string]string `protobuf:"bytes,7,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Optional. The runtime log config for job execution.
LoggingConfig *LoggingConfig `protobuf:"bytes,8,opt,name=logging_config,json=loggingConfig,proto3" json:"logging_config,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PySparkJob) Reset() { *m = PySparkJob{} }
func (m *PySparkJob) String() string { return proto.CompactTextString(m) }
func (*PySparkJob) ProtoMessage() {}
func (*PySparkJob) Descriptor() ([]byte, []int) {
return fileDescriptor_20fb118582e1d7de, []int{3}
}
func (m *PySparkJob) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PySparkJob.Unmarshal(m, b)
}
func (m *PySparkJob) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PySparkJob.Marshal(b, m, deterministic)
}
func (m *PySparkJob) XXX_Merge(src proto.Message) {
xxx_messageInfo_PySparkJob.Merge(m, src)
}
func (m *PySparkJob) XXX_Size() int {
return xxx_messageInfo_PySparkJob.Size(m)
}
func (m *PySparkJob) XXX_DiscardUnknown() {
xxx_messageInfo_PySparkJob.DiscardUnknown(m)
}
var xxx_messageInfo_PySparkJob proto.InternalMessageInfo
func (m *PySparkJob) GetMainPythonFileUri() string {
if m != nil {
return m.MainPythonFileUri
}
return ""
}
func (m *PySparkJob) GetArgs() []string {
if m != nil {
return m.Args
}
return nil
}
func (m *PySparkJob) GetPythonFileUris() []string {
if m != nil {
return m.PythonFileUris
}
return nil
}
func (m *PySparkJob) GetJarFileUris() []string {
if m != nil {
return m.JarFileUris
}
return nil
}
func (m *PySparkJob) GetFileUris() []string {
if m != nil {
return m.FileUris
}
return nil
}
func (m *PySparkJob) GetArchiveUris() []string {
if m != nil {
return m.ArchiveUris
}
return nil
}
func (m *PySparkJob) GetProperties() map[string]string {
if m != nil {
return m.Properties
}
return nil
}
func (m *PySparkJob) GetLoggingConfig() *LoggingConfig {
if m != nil {
return m.LoggingConfig
}
return nil
}
// A list of queries to run on a cluster.
type QueryList struct {
// Required. The queries to execute. You do not need to terminate a query
// with a semicolon. Multiple queries can be specified in one string
// by separating each with a semicolon. Here is an example of an Cloud
// Dataproc API snippet that uses a QueryList to specify a HiveJob:
//
// "hiveJob": {
// "queryList": {
// "queries": [
// "query1",
// "query2",
// "query3;query4",
// ]
// }
// }
Queries []string `protobuf:"bytes,1,rep,name=queries,proto3" json:"queries,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *QueryList) Reset() { *m = QueryList{} }
func (m *QueryList) String() string { return proto.CompactTextString(m) }
func (*QueryList) ProtoMessage() {}
func (*QueryList) Descriptor() ([]byte, []int) {
return fileDescriptor_20fb118582e1d7de, []int{4}
}
func (m *QueryList) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryList.Unmarshal(m, b)
}
func (m *QueryList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryList.Marshal(b, m, deterministic)
}
func (m *QueryList) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryList.Merge(m, src)
}
func (m *QueryList) XXX_Size() int {
return xxx_messageInfo_QueryList.Size(m)
}
func (m *QueryList) XXX_DiscardUnknown() {
xxx_messageInfo_QueryList.DiscardUnknown(m)
}
var xxx_messageInfo_QueryList proto.InternalMessageInfo
func (m *QueryList) GetQueries() []string {
if m != nil {
return m.Queries
}
return nil
}
// A Cloud Dataproc job for running [Apache Hive](https://hive.apache.org/)
// queries on YARN.
type HiveJob struct {
// Required. The sequence of Hive queries to execute, specified as either
// an HCFS file URI or a list of queries.
//
// Types that are valid to be assigned to Queries:
// *HiveJob_QueryFileUri
// *HiveJob_QueryList
Queries isHiveJob_Queries `protobuf_oneof:"queries"`
// Optional. Whether to continue executing queries if a query fails.
// The default value is `false`. Setting to `true` can be useful when executing
// independent parallel queries.
ContinueOnFailure bool `protobuf:"varint,3,opt,name=continue_on_failure,json=continueOnFailure,proto3" json:"continue_on_failure,omitempty"`
// Optional. Mapping of query variable names to values (equivalent to the
// Hive command: `SET name="value";`).
ScriptVariables map[string]string `protobuf:"bytes,4,rep,name=script_variables,json=scriptVariables,proto3" json:"script_variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Optional. A mapping of property names and values, used to configure Hive.
// Properties that conflict with values set by the Cloud Dataproc API may be
// overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
// /etc/hive/conf/hive-site.xml, and classes in user code.
Properties map[string]string `protobuf:"bytes,5,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Optional. HCFS URIs of jar files to add to the CLASSPATH of the
// Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
// and UDFs.
JarFileUris []string `protobuf:"bytes,6,rep,name=jar_file_uris,json=jarFileUris,proto3" json:"jar_file_uris,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *HiveJob) Reset() { *m = HiveJob{} }
func (m *HiveJob) String() string { return proto.CompactTextString(m) }
func (*HiveJob) ProtoMessage() {}
func (*HiveJob) Descriptor() ([]byte, []int) {
return fileDescriptor_20fb118582e1d7de, []int{5}
}
func (m *HiveJob) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_HiveJob.Unmarshal(m, b)
}
func (m *HiveJob) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_HiveJob.Marshal(b, m, deterministic)
}
func (m *HiveJob) XXX_Merge(src proto.Message) {
xxx_messageInfo_HiveJob.Merge(m, src)
}
func (m *HiveJob) XXX_Size() int {
return xxx_messageInfo_HiveJob.Size(m)
}
func (m *HiveJob) XXX_DiscardUnknown() {
xxx_messageInfo_HiveJob.DiscardUnknown(m)
}
var xxx_messageInfo_HiveJob proto.InternalMessageInfo
type isHiveJob_Queries interface {
isHiveJob_Queries()
}
type HiveJob_QueryFileUri struct {
QueryFileUri string `protobuf:"bytes,1,opt,name=query_file_uri,json=queryFileUri,proto3,oneof"`
}
type HiveJob_QueryList struct {
QueryList *QueryList `protobuf:"bytes,2,opt,name=query_list,json=queryList,proto3,oneof"`
}
func (*HiveJob_QueryFileUri) isHiveJob_Queries() {}
func (*HiveJob_QueryList) isHiveJob_Queries() {}
func (m *HiveJob) GetQueries() isHiveJob_Queries {
if m != nil {
return m.Queries
}
return nil
}
func (m *HiveJob) GetQueryFileUri() string {