yarn_service_protos.proto 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. /**
  19. * These .proto interfaces are public and stable.
  20. * Please see http://wiki.apache.org/hadoop/Compatibility
  21. * for what changes are allowed for a *stable* .proto interface.
  22. */
  23. option java_package = "org.apache.hadoop.yarn.proto";
  24. option java_outer_classname = "YarnServiceProtos";
  25. option java_generic_services = true;
  26. option java_generate_equals_and_hash = true;
  27. package hadoop.yarn;
  28. import "Security.proto";
  29. import "yarn_protos.proto";
  30. //////////////////////////////////////////////////////
  31. /////// AM_RM_Protocol ///////////////////////////////
  32. //////////////////////////////////////////////////////
  33. message RegisterApplicationMasterRequestProto {
  34. optional string host = 1;
  35. optional int32 rpc_port = 2;
  36. optional string tracking_url = 3;
  37. }
  38. message RegisterApplicationMasterResponseProto {
  39. optional ResourceProto maximumCapability = 1;
  40. optional bytes client_to_am_token_master_key = 2;
  41. repeated ApplicationACLMapProto application_ACLs = 3;
  42. }
  43. message FinishApplicationMasterRequestProto {
  44. optional string diagnostics = 1;
  45. optional string tracking_url = 2;
  46. optional FinalApplicationStatusProto final_application_status = 3;
  47. }
  48. message FinishApplicationMasterResponseProto {
  49. optional bool isUnregistered = 1 [default = false];
  50. }
  51. message AllocateRequestProto {
  52. repeated ResourceRequestProto ask = 1;
  53. repeated ContainerIdProto release = 2;
  54. optional ResourceBlacklistRequestProto blacklist_request = 3;
  55. optional int32 response_id = 4;
  56. optional float progress = 5;
  57. repeated ContainerResourceIncreaseRequestProto increase_request = 6;
  58. }
  59. message NMTokenProto {
  60. optional NodeIdProto nodeId = 1;
  61. optional hadoop.common.TokenProto token = 2;
  62. }
  63. message AllocateResponseProto {
  64. optional AMCommandProto a_m_command = 1;
  65. optional int32 response_id = 2;
  66. repeated ContainerProto allocated_containers = 3;
  67. repeated ContainerStatusProto completed_container_statuses = 4;
  68. optional ResourceProto limit = 5;
  69. repeated NodeReportProto updated_nodes = 6;
  70. optional int32 num_cluster_nodes = 7;
  71. optional PreemptionMessageProto preempt = 8;
  72. repeated NMTokenProto nm_tokens = 9;
  73. repeated ContainerResourceIncreaseProto increased_containers = 10;
  74. repeated ContainerResourceDecreaseProto decreased_containers = 11;
  75. }
  76. //////////////////////////////////////////////////////
  77. /////// client_RM_Protocol ///////////////////////////
  78. //////////////////////////////////////////////////////
  79. message GetNewApplicationRequestProto {
  80. }
  81. message GetNewApplicationResponseProto {
  82. optional ApplicationIdProto application_id = 1;
  83. optional ResourceProto maximumCapability = 2;
  84. }
  85. message GetApplicationReportRequestProto {
  86. optional ApplicationIdProto application_id = 1;
  87. }
  88. message GetApplicationReportResponseProto {
  89. optional ApplicationReportProto application_report = 1;
  90. }
  91. message SubmitApplicationRequestProto {
  92. optional ApplicationSubmissionContextProto application_submission_context= 1;
  93. }
  94. message SubmitApplicationResponseProto {
  95. }
  96. message KillApplicationRequestProto {
  97. optional ApplicationIdProto application_id = 1;
  98. }
  99. message KillApplicationResponseProto {
  100. }
  101. message GetClusterMetricsRequestProto {
  102. }
  103. message GetClusterMetricsResponseProto {
  104. optional YarnClusterMetricsProto cluster_metrics = 1;
  105. }
  106. message GetApplicationsRequestProto {
  107. repeated string application_types = 1;
  108. repeated YarnApplicationStateProto application_states = 2;
  109. repeated string users = 3;
  110. repeated string queues = 4;
  111. optional int64 limit = 5;
  112. optional int64 start_begin = 6;
  113. optional int64 start_end = 7;
  114. optional int64 finish_begin = 8;
  115. optional int64 finish_end = 9;
  116. }
  117. message GetApplicationsResponseProto {
  118. repeated ApplicationReportProto applications = 1;
  119. }
  120. message GetClusterNodesRequestProto {
  121. repeated NodeStateProto nodeStates = 1;
  122. }
  123. message GetClusterNodesResponseProto {
  124. repeated NodeReportProto nodeReports = 1;
  125. }
  126. message GetQueueInfoRequestProto {
  127. optional string queueName = 1;
  128. optional bool includeApplications = 2;
  129. optional bool includeChildQueues = 3;
  130. optional bool recursive = 4;
  131. }
  132. message GetQueueInfoResponseProto {
  133. optional QueueInfoProto queueInfo = 1;
  134. }
  135. message GetQueueUserAclsInfoRequestProto {
  136. }
  137. message GetQueueUserAclsInfoResponseProto {
  138. repeated QueueUserACLInfoProto queueUserAcls = 1;
  139. }
  140. //////////////////////////////////////////////////////
  141. /////// client_NM_Protocol ///////////////////////////
  142. //////////////////////////////////////////////////////
  143. message StartContainerRequestProto {
  144. optional ContainerLaunchContextProto container_launch_context = 1;
  145. optional hadoop.common.TokenProto container_token = 2;
  146. }
  147. message StartContainerResponseProto {
  148. repeated StringBytesMapProto services_meta_data = 1;
  149. }
  150. message StopContainerRequestProto {
  151. optional ContainerIdProto container_id = 1;
  152. }
  153. message StopContainerResponseProto {
  154. }
  155. message GetContainerStatusRequestProto {
  156. optional ContainerIdProto container_id = 1;
  157. }
  158. message GetContainerStatusResponseProto {
  159. optional ContainerStatusProto status = 1;
  160. }
  161. //// bulk API records
  162. message StartContainersRequestProto {
  163. repeated StartContainerRequestProto start_container_request = 1;
  164. }
  165. message ContainerExceptionMapProto {
  166. optional ContainerIdProto container_id = 1;
  167. optional SerializedExceptionProto exception = 2;
  168. }
  169. message StartContainersResponseProto {
  170. repeated StringBytesMapProto services_meta_data = 1;
  171. repeated ContainerIdProto succeeded_requests = 2;
  172. repeated ContainerExceptionMapProto failed_requests = 3;
  173. }
  174. message StopContainersRequestProto {
  175. repeated ContainerIdProto container_id = 1;
  176. }
  177. message StopContainersResponseProto {
  178. repeated ContainerIdProto succeeded_requests = 1;
  179. repeated ContainerExceptionMapProto failed_requests = 2;
  180. }
  181. message GetContainerStatusesRequestProto {
  182. repeated ContainerIdProto container_id = 1;
  183. }
  184. message GetContainerStatusesResponseProto {
  185. repeated ContainerStatusProto status = 1;
  186. repeated ContainerExceptionMapProto failed_requests = 2;
  187. }