-
Notifications
You must be signed in to change notification settings - Fork 8.8k
/
yarn_protos.proto
839 lines (724 loc) · 24 KB
/
yarn_protos.proto
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
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* These .proto interfaces are public and stable.
* Please see http://wiki.apache.org/hadoop/Compatibility
* for what changes are allowed for a *stable* .proto interface.
*/
syntax = "proto2";
option java_package = "org.apache.hadoop.yarn.proto";
option java_outer_classname = "YarnProtos";
option java_generic_services = true;
option java_generate_equals_and_hash = true;
package hadoop.yarn;
import "Security.proto";
message SerializedExceptionProto {
optional string message = 1;
optional string trace = 2;
optional string class_name = 3;
optional SerializedExceptionProto cause = 4;
}
message ApplicationIdProto {
optional int32 id = 1;
optional int64 cluster_timestamp = 2;
}
message ApplicationAttemptIdProto {
optional ApplicationIdProto application_id = 1;
optional int32 attemptId = 2;
}
message ContainerIdProto {
optional ApplicationIdProto app_id = 1;
optional ApplicationAttemptIdProto app_attempt_id = 2;
optional int64 id = 3;
}
enum ResourceTypesProto {
COUNTABLE = 0;
}
message ResourceInformationProto {
required string key = 1;
optional int64 value = 2;
optional string units = 3;
optional ResourceTypesProto type = 4;
repeated string tags = 5;
repeated StringStringMapProto attributes = 6;
}
message ResourceTypeInfoProto {
required string name = 1;
optional string units = 2;
optional ResourceTypesProto type = 3;
}
message ResourceProto {
optional int64 memory = 1;
optional int32 virtual_cores = 2;
repeated ResourceInformationProto resource_value_map = 3;
}
message ResourceUtilizationProto {
optional int32 pmem = 1;
optional int32 vmem = 2;
optional float cpu = 3;
}
message ResourceOptionProto {
optional ResourceProto resource = 1;
optional int32 over_commit_timeout = 2;
}
message ResourceProfileEntry {
required string name = 1;
required ResourceProto resources = 2;
}
message ResourceProfilesProto {
repeated ResourceProfileEntry resource_profiles_map = 1;
}
message NodeResourceMapProto {
optional NodeIdProto node_id = 1;
optional ResourceOptionProto resource_option = 2;
}
message PriorityProto {
optional int32 priority = 1;
}
enum ContainerStateProto {
C_NEW = 1;
C_RUNNING = 2;
C_COMPLETE = 3;
}
enum ContainerSubStateProto {
/**
* NEW, LOCALIZING, SCHEDULED,
* REINITIALIZING_AWAITING_KILL, RELAUNCHING,
*/
CSS_SCHEDULED = 1;
/**
* RUNNING, REINITIALIZING, PAUSING, KILLING
*/
CSS_RUNNING = 2;
/**
* PAUSED, RESUMING
*/
CSS_PAUSED = 3;
/**
* LOCALIZATION_FAILED, EXITED_WITH_SUCCESS,
* EXITED_WITH_FAILURE,
* CONTAINER_CLEANEDUP_AFTER_KILL,
* CONTAINER_RESOURCES_CLEANINGUP
*/
CSS_COMPLETING = 4;
/**
* DONE
*/
CSS_DONE = 5;
}
message ContainerProto {
optional ContainerIdProto id = 1;
optional NodeIdProto nodeId = 2;
optional string node_http_address = 3;
optional ResourceProto resource = 4;
optional PriorityProto priority = 5;
optional hadoop.common.TokenProto container_token = 6;
optional ExecutionTypeProto execution_type = 7 [default = GUARANTEED];
optional int64 allocation_request_id = 8 [default = -1];
optional int32 version = 9 [default = 0];
repeated string allocation_tags = 10;
optional string exposed_ports = 11;
}
message ContainerReportProto {
optional ContainerIdProto container_id = 1;
optional ResourceProto resource = 2;
optional NodeIdProto node_id = 3;
optional PriorityProto priority = 4;
optional int64 creation_time = 5;
optional int64 finish_time = 6;
optional string diagnostics_info = 7 [default = "N/A"];
optional string log_url = 8;
optional int32 container_exit_status = 9;
optional ContainerStateProto container_state = 10;
optional string node_http_address = 11;
optional ExecutionTypeProto executionType = 12 [default = GUARANTEED];
optional string exposed_ports = 13;
}
enum YarnApplicationStateProto {
NEW = 1;
NEW_SAVING = 2;
SUBMITTED = 3;
ACCEPTED = 4;
RUNNING = 5;
FINISHED = 6;
FAILED = 7;
KILLED = 8;
}
enum YarnApplicationAttemptStateProto {
APP_ATTEMPT_NEW = 1;
APP_ATTEMPT_SUBMITTED = 2;
APP_ATTEMPT_SCHEDULED = 3;
APP_ATTEMPT_ALLOCATED_SAVING = 4;
APP_ATTEMPT_ALLOCATED = 5;
APP_ATTEMPT_LAUNCHED = 6;
APP_ATTEMPT_FAILED = 7;
APP_ATTEMPT_RUNNING = 8;
APP_ATTEMPT_FINISHING = 9;
APP_ATTEMPT_FINISHED = 10;
APP_ATTEMPT_KILLED = 11;
}
enum FinalApplicationStatusProto {
APP_UNDEFINED = 0;
APP_SUCCEEDED = 1;
APP_FAILED = 2;
APP_KILLED = 3;
APP_ENDED = 4;
}
message URLProto {
optional string scheme = 1;
optional string host = 2;
optional int32 port = 3;
optional string file = 4;
optional string userInfo = 5;
}
enum LocalResourceVisibilityProto {
PUBLIC = 1;
PRIVATE = 2;
APPLICATION = 3;
}
enum LocalResourceTypeProto {
ARCHIVE = 1;
FILE = 2;
PATTERN = 3;
}
message LocalResourceProto {
optional URLProto resource = 1;
optional int64 size = 2;
optional int64 timestamp = 3;
optional LocalResourceTypeProto type = 4;
optional LocalResourceVisibilityProto visibility = 5;
optional string pattern = 6;
optional bool should_be_uploaded_to_shared_cache = 7;
}
message StringLongMapProto {
required string key = 1;
required int64 value = 2;
}
message ApplicationResourceUsageReportProto {
optional int32 num_used_containers = 1;
optional int32 num_reserved_containers = 2;
optional ResourceProto used_resources = 3;
optional ResourceProto reserved_resources = 4;
optional ResourceProto needed_resources = 5;
optional int64 memory_seconds = 6;
optional int64 vcore_seconds = 7;
optional float queue_usage_percentage = 8;
optional float cluster_usage_percentage = 9;
optional int64 preempted_memory_seconds = 10;
optional int64 preempted_vcore_seconds = 11;
repeated StringLongMapProto application_resource_usage_map = 12;
repeated StringLongMapProto application_preempted_resource_usage_map = 13;
}
message ApplicationReportProto {
optional ApplicationIdProto applicationId = 1;
optional string user = 2;
optional string queue = 3;
optional string name = 4;
optional string host = 5;
optional int32 rpc_port = 6;
optional hadoop.common.TokenProto client_to_am_token = 7;
optional YarnApplicationStateProto yarn_application_state = 8;
optional string trackingUrl = 9;
optional string diagnostics = 10 [default = "N/A"];
optional int64 startTime = 11;
optional int64 finishTime = 12;
optional FinalApplicationStatusProto final_application_status = 13;
optional ApplicationResourceUsageReportProto app_resource_Usage = 14;
optional string originalTrackingUrl = 15;
optional ApplicationAttemptIdProto currentApplicationAttemptId = 16;
optional float progress = 17;
optional string applicationType = 18;
optional hadoop.common.TokenProto am_rm_token = 19;
repeated string applicationTags = 20;
optional LogAggregationStatusProto log_aggregation_status = 21;
optional bool unmanaged_application = 22 [default = false];
optional PriorityProto priority = 23;
optional string appNodeLabelExpression = 24;
optional string amNodeLabelExpression = 25;
repeated AppTimeoutsMapProto appTimeouts = 26;
optional int64 launchTime = 27;
optional int64 submitTime = 28;
optional string rmClusterId = 29;
}
message AppTimeoutsMapProto {
optional ApplicationTimeoutTypeProto application_timeout_type = 1;
optional ApplicationTimeoutProto application_timeout = 2;
}
message ApplicationTimeoutProto {
required ApplicationTimeoutTypeProto application_timeout_type = 1;
optional string expire_time = 2;
optional int64 remaining_time = 3;
}
enum LogAggregationStatusProto {
LOG_DISABLED = 1;
LOG_NOT_START = 2;
LOG_RUNNING = 3;
LOG_SUCCEEDED = 4;
LOG_FAILED = 5;
LOG_TIME_OUT = 6;
LOG_RUNNING_WITH_FAILURE = 7;
}
message ApplicationAttemptReportProto {
optional ApplicationAttemptIdProto application_attempt_id = 1;
optional string host = 2;
optional int32 rpc_port = 3;
optional string tracking_url = 4;
optional string diagnostics = 5 [default = "N/A"];
optional YarnApplicationAttemptStateProto yarn_application_attempt_state = 6;
optional ContainerIdProto am_container_id = 7;
optional string original_tracking_url = 8;
optional int64 startTime = 9;
optional int64 finishTime = 10;
}
enum NodeStateProto {
NS_NEW = 1;
NS_RUNNING = 2;
NS_UNHEALTHY = 3;
NS_DECOMMISSIONED = 4;
NS_LOST = 5;
NS_REBOOTED = 6;
NS_DECOMMISSIONING = 7;
NS_SHUTDOWN = 8;
}
message NodeIdProto {
optional string host = 1;
optional int32 port = 2;
}
enum NodeUpdateTypeProto {
NODE_USABLE = 0;
NODE_UNUSABLE = 1;
NODE_DECOMMISSIONING = 2;
}
message NodeReportProto {
optional NodeIdProto nodeId = 1;
optional string httpAddress = 2;
optional string rackName = 3;
optional ResourceProto used = 4;
optional ResourceProto capability = 5;
optional int32 numContainers = 6;
optional NodeStateProto node_state = 7;
optional string health_report = 8;
optional int64 last_health_report_time = 9;
repeated string node_labels = 10;
optional ResourceUtilizationProto containers_utilization = 11;
optional ResourceUtilizationProto node_utilization = 12;
optional uint32 decommissioning_timeout = 13;
optional NodeUpdateTypeProto node_update_type = 14;
repeated NodeAttributeProto node_attributes = 15;
}
message NodeIdToLabelsProto {
optional NodeIdProto nodeId = 1;
repeated string nodeLabels = 2;
}
message LabelsToNodeIdsProto {
optional string nodeLabels = 1;
repeated NodeIdProto nodeId = 2;
}
message NodeLabelProto {
optional string name = 1;
optional bool isExclusive = 2 [default = true];
}
enum NodeAttributeTypeProto {
STRING = 1;
}
message NodeAttributeKeyProto {
optional string attributePrefix = 1 [default="rm.yarn.io"];
required string attributeName = 2;
}
message NodeAttributeProto {
required NodeAttributeKeyProto attributeKey = 1;
optional NodeAttributeTypeProto attributeType = 2 [default = STRING];
optional string attributeValue = 3 [default=""];
}
message NodeAttributeInfoProto {
required NodeAttributeKeyProto attributeKey = 1;
required NodeAttributeTypeProto attributeType = 2;
}
message NodeToAttributeValueProto {
required string hostname = 1;
required string attributeValue = 2;
}
message AttributeToNodesProto {
required NodeAttributeKeyProto nodeAttribute = 1;
repeated NodeToAttributeValueProto nodeValueMap = 2;
}
message NodeToAttributesProto {
optional string node = 1;
repeated NodeAttributeProto nodeAttributes = 2;
}
enum ContainerTypeProto {
APPLICATION_MASTER = 1;
TASK = 2;
}
enum ExecutionTypeProto {
GUARANTEED = 1;
OPPORTUNISTIC = 2;
}
////////////////////////////////////////////////////////////////////////
////// From AM_RM_Protocol /////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
message ResourceRequestProto {
optional PriorityProto priority = 1;
optional string resource_name = 2;
optional ResourceProto capability = 3;
optional int32 num_containers = 4;
optional bool relax_locality = 5 [default = true];
optional string node_label_expression = 6;
optional ExecutionTypeRequestProto execution_type_request = 7;
optional int64 allocation_request_id = 8 [default = -1];
}
message ExecutionTypeRequestProto {
optional ExecutionTypeProto execution_type = 1 [default = GUARANTEED];
optional bool enforce_execution_type = 2 [default = false];
}
message SchedulingRequestProto {
optional int64 allocationRequestId = 1 [default = 0];
optional PriorityProto priority = 2;
optional ExecutionTypeRequestProto executionType = 3;
repeated string allocationTags = 4;
optional ResourceSizingProto resourceSizing = 5;
optional PlacementConstraintProto placementConstraint = 6;
}
message ResourceSizingProto {
optional int32 numAllocations = 1;
optional ResourceProto resources = 2;
}
enum AMCommandProto {
AM_RESYNC = 1;
AM_SHUTDOWN = 2;
}
enum RejectionReasonProto {
RRP_COULD_NOT_PLACE_ON_NODE = 1;
RRP_COULD_NOT_SCHEDULE_ON_NODE = 2;
}
message RejectedSchedulingRequestProto {
required RejectionReasonProto reason = 1;
required SchedulingRequestProto request = 2;
}
message PreemptionMessageProto {
optional StrictPreemptionContractProto strictContract = 1;
optional PreemptionContractProto contract = 2;
}
message StrictPreemptionContractProto {
repeated PreemptionContainerProto container = 1;
}
message PreemptionContractProto {
repeated PreemptionResourceRequestProto resource = 1;
repeated PreemptionContainerProto container = 2;
}
message PreemptionContainerProto {
optional ContainerIdProto id = 1;
}
message PreemptionResourceRequestProto {
optional ResourceRequestProto resource = 1;
}
message ResourceBlacklistRequestProto {
repeated string blacklist_additions = 1;
repeated string blacklist_removals = 2;
}
////////////////////////////////////////////////////////////////////////
////// From client_RM_Protocol /////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
message ApplicationSubmissionContextProto {
optional ApplicationIdProto application_id = 1;
optional string application_name = 2 [default = "N/A"];
optional string queue = 3 [default = "default"];
optional PriorityProto priority = 4;
optional ContainerLaunchContextProto am_container_spec = 5;
optional bool cancel_tokens_when_complete = 6 [default = true];
optional bool unmanaged_am = 7 [default = false];
optional int32 maxAppAttempts = 8 [default = 0];
optional ResourceProto resource = 9;
optional string applicationType = 10 [default = "YARN"];
optional bool keep_containers_across_application_attempts = 11 [default = false];
repeated string applicationTags = 12;
optional int64 attempt_failures_validity_interval = 13 [default = -1];
optional LogAggregationContextProto log_aggregation_context = 14;
optional ReservationIdProto reservation_id = 15;
optional string node_label_expression = 16;
repeated ResourceRequestProto am_container_resource_request = 17;
repeated ApplicationTimeoutMapProto application_timeouts = 18;
repeated StringStringMapProto application_scheduling_properties = 19;
}
enum ApplicationTimeoutTypeProto {
APP_TIMEOUT_LIFETIME = 1;
}
message ApplicationTimeoutMapProto {
optional ApplicationTimeoutTypeProto application_timeout_type = 1;
optional int64 timeout = 2;
}
message ApplicationUpdateTimeoutMapProto {
optional ApplicationTimeoutTypeProto application_timeout_type = 1;
optional string expire_time = 2;
}
message LogAggregationContextProto {
optional string include_pattern = 1 [default = ".*"];
optional string exclude_pattern = 2 [default = ""];
optional string rolled_logs_include_pattern = 3 [default = ""];
optional string rolled_logs_exclude_pattern = 4 [default = ".*"];
optional string log_aggregation_policy_class_name = 5;
optional string log_aggregation_policy_parameters = 6;
}
enum ApplicationAccessTypeProto {
APPACCESS_VIEW_APP = 1;
APPACCESS_MODIFY_APP = 2;
}
message ApplicationACLMapProto {
optional ApplicationAccessTypeProto accessType = 1;
optional string acl = 2 [default = " "];
}
message YarnClusterMetricsProto {
optional int32 num_node_managers = 1;
optional int32 num_decommissioned_nms = 2;
optional int32 num_active_nms = 3;
optional int32 num_lost_nms = 4;
optional int32 num_unhealthy_nms = 5;
optional int32 num_rebooted_nms = 6;
}
enum QueueStateProto {
Q_STOPPED = 1;
Q_RUNNING = 2;
Q_DRAINING = 3;
}
message QueueStatisticsProto {
optional int64 numAppsSubmitted = 1;
optional int64 numAppsRunning = 2;
optional int64 numAppsPending = 3;
optional int64 numAppsCompleted = 4;
optional int64 numAppsKilled = 5;
optional int64 numAppsFailed = 6;
optional int64 numActiveUsers = 7;
optional int64 availableMemoryMB = 8;
optional int64 allocatedMemoryMB = 9;
optional int64 pendingMemoryMB = 10;
optional int64 reservedMemoryMB = 11;
optional int64 availableVCores = 12;
optional int64 allocatedVCores = 13;
optional int64 pendingVCores = 14;
optional int64 reservedVCores = 15;
optional int64 allocatedContainers = 16;
optional int64 pendingContainers = 17;
optional int64 reservedContainers = 18;
}
message QueueInfoProto {
optional string queueName = 1;
optional float capacity = 2;
optional float maximumCapacity = 3;
optional float currentCapacity = 4;
optional QueueStateProto state = 5;
repeated QueueInfoProto childQueues = 6;
repeated ApplicationReportProto applications = 7;
repeated string accessibleNodeLabels = 8;
optional string defaultNodeLabelExpression = 9;
optional QueueStatisticsProto queueStatistics = 10;
optional bool preemptionDisabled = 11;
repeated QueueConfigurationsMapProto queueConfigurationsMap = 12;
optional bool intraQueuePreemptionDisabled = 13;
}
message QueueConfigurationsProto {
optional float capacity = 1;
optional float absoluteCapacity = 2;
optional float maxCapacity = 3;
optional float absoluteMaxCapacity = 4;
optional float maxAMPercentage = 5;
optional ResourceProto effectiveMinCapacity = 6;
optional ResourceProto effectiveMaxCapacity = 7;
optional ResourceProto configuredMinCapacity = 8;
optional ResourceProto configuredMaxCapacity = 9;
}
message QueueConfigurationsMapProto {
required string partitionName = 1;
optional QueueConfigurationsProto queueConfigurations = 2;
}
enum QueueACLProto {
QACL_SUBMIT_APPLICATIONS = 1;
QACL_ADMINISTER_QUEUE = 2;
}
message QueueUserACLInfoProto {
optional string queueName = 1;
repeated QueueACLProto userAcls = 2;
}
enum SignalContainerCommandProto {
OUTPUT_THREAD_DUMP = 1;
GRACEFUL_SHUTDOWN = 2;
FORCEFUL_SHUTDOWN = 3;
}
////////////////////////////////////////////////////////////////////////
////// Placement constraints ///////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
message PlacementConstraintProto {
optional SimplePlacementConstraintProto simpleConstraint = 1;
optional CompositePlacementConstraintProto compositeConstraint = 2;
}
enum NodeAttributeOpCodeProto {
NO_OP = 1;
EQ = 2;
NE = 3;
}
message SimplePlacementConstraintProto {
required string scope = 1;
repeated PlacementConstraintTargetProto targetExpressions = 2;
optional int32 minCardinality = 3;
optional int32 maxCardinality = 4;
optional NodeAttributeOpCodeProto attributeOpCode = 5;
}
message PlacementConstraintTargetProto {
enum TargetType {
NODE_ATTRIBUTE = 1;
ALLOCATION_TAG = 2;
SELF = 3;
}
required TargetType targetType = 1;
optional string targetKey = 2;
repeated string targetValues = 3;
}
message TimedPlacementConstraintProto {
enum DelayUnit {
MILLISECONDS = 1;
OPPORTUNITIES = 2;
}
required PlacementConstraintProto placementConstraint = 1;
required int64 schedulingDelay = 2;
optional DelayUnit delayUnit = 3 [ default = MILLISECONDS ];
}
message CompositePlacementConstraintProto {
enum CompositeType {
// All children constraints have to be satisfied.
AND = 1;
// One of the children constraints has to be satisfied.
OR = 2;
// Attempt to satisfy the first child constraint for delays[0] units (e.g.,
// millisec or heartbeats). If this fails, try to satisfy the second child
// constraint for delays[1] units and so on.
DELAYED_OR = 3;
}
required CompositeType compositeType = 1;
repeated PlacementConstraintProto childConstraints = 2;
repeated TimedPlacementConstraintProto timedChildConstraints = 3;
}
// This associates a set of allocation tags to a Placement Constraint.
message PlacementConstraintMapEntryProto {
repeated string allocation_tags = 1;
optional PlacementConstraintProto placement_constraint = 2;
}
////////////////////////////////////////////////////////////////////////
////// From reservation_protocol /////////////////////////////////////
////////////////////////////////////////////////////////////////////////
message ReservationIdProto {
optional int64 id = 1;
optional int64 cluster_timestamp = 2;
}
message ReservationRequestProto {
optional ResourceProto capability = 1;
optional int32 num_containers = 2 [default = 1];
optional int32 concurrency = 3 [default = 1];
optional int64 duration = 4 [default = -1];
}
message ReservationRequestsProto {
repeated ReservationRequestProto reservation_resources = 1;
optional ReservationRequestInterpreterProto interpreter = 2 [default = R_ALL];
}
message ReservationDefinitionProto {
optional ReservationRequestsProto reservation_requests = 1;
optional int64 arrival = 2;
optional int64 deadline = 3;
optional string reservation_name = 4;
optional string recurrence_expression = 5 [default = "0"];
optional PriorityProto priority = 6;
}
message ResourceAllocationRequestProto {
optional int64 start_time = 1;
optional int64 end_time = 2;
optional ResourceProto resource = 3;
}
message ReservationAllocationStateProto {
optional ReservationDefinitionProto reservation_definition = 1;
repeated ResourceAllocationRequestProto allocation_requests = 2;
optional int64 start_time = 3;
optional int64 end_time = 4;
optional string user = 5;
optional bool contains_gangs = 6;
optional int64 acceptance_time = 7;
optional ReservationIdProto reservation_id = 8;
}
enum ReservationRequestInterpreterProto {
R_ANY = 0;
R_ALL = 1;
R_ORDER = 2;
R_ORDER_NO_GAP = 3;
}
////////////////////////////////////////////////////////////////////////
////// From container_manager //////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
message ContainerLaunchContextProto {
repeated StringLocalResourceMapProto localResources = 1;
optional bytes tokens = 2;
repeated StringBytesMapProto service_data = 3;
repeated StringStringMapProto environment = 4;
repeated string command = 5;
repeated ApplicationACLMapProto application_ACLs = 6;
optional ContainerRetryContextProto container_retry_context = 7;
optional bytes tokens_conf = 8;
}
message ContainerStatusProto {
optional ContainerIdProto container_id = 1;
optional ContainerStateProto state = 2;
optional string diagnostics = 3 [default = "N/A"];
optional int32 exit_status = 4 [default = -1000];
optional ResourceProto capability = 5;
optional ExecutionTypeProto executionType = 6 [default = GUARANTEED];
repeated StringStringMapProto container_attributes = 7;
optional ContainerSubStateProto container_sub_state = 8;
}
enum ContainerExitStatusProto {
SUCCESS = 0;
INVALID = -1000;
ABORTED = -100;
DISKS_FAILED = -101;
}
message ContainerRetryContextProto {
optional ContainerRetryPolicyProto retry_policy = 1 [default = NEVER_RETRY];
repeated int32 error_codes = 2;
optional int32 max_retries = 3 [default = 0];
optional int32 retry_interval = 4 [default = 0];
optional int64 failures_validity_interval = 5 [default = -1];
}
enum ContainerRetryPolicyProto {
NEVER_RETRY = 0;
RETRY_ON_ALL_ERRORS = 1;
RETRY_ON_SPECIFIC_ERROR_CODES = 2;
}
////////////////////////////////////////////////////////////////////////
////// From common//////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
message StringLocalResourceMapProto {
optional string key = 1;
optional LocalResourceProto value = 2;
}
message StringStringMapProto {
optional string key = 1;
optional string value = 2;
}
message StringBytesMapProto {
optional string key = 1;
optional bytes value = 2;
}
message CollectorInfoProto {
optional string collector_addr = 1;
optional hadoop.common.TokenProto collector_token = 2;
}