1
0

ClientDatanodeProtocol.proto 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  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 private and stable.
  20. * Please see http://wiki.apache.org/hadoop/Compatibility
  21. * for what changes are allowed for a *stable* .proto interface.
  22. */
  23. // This file contains protocol buffers that are used throughout HDFS -- i.e.
  24. // by the client, server, and data transfer protocols.
  25. option java_package = "org.apache.hadoop.hdfs.protocol.proto";
  26. option java_outer_classname = "ClientDatanodeProtocolProtos";
  27. option java_generic_services = true;
  28. option java_generate_equals_and_hash = true;
  29. package hadoop.hdfs;
  30. import "Security.proto";
  31. import "hdfs.proto";
  32. import "ReconfigurationProtocol.proto";
  33. /**
  34. * block - block for which visible length is requested
  35. */
  36. message GetReplicaVisibleLengthRequestProto {
  37. required ExtendedBlockProto block = 1;
  38. }
  39. /**
  40. * length - visible length of the block
  41. */
  42. message GetReplicaVisibleLengthResponseProto {
  43. required uint64 length = 1;
  44. }
  45. /**
  46. * void request
  47. */
  48. message RefreshNamenodesRequestProto {
  49. }
  50. /**
  51. * void response
  52. */
  53. message RefreshNamenodesResponseProto {
  54. }
  55. /**
  56. * blockPool - block pool to be deleted
  57. * force - if false, delete the block pool only if it is empty.
  58. * if true, delete the block pool even if it has blocks.
  59. */
  60. message DeleteBlockPoolRequestProto {
  61. required string blockPool = 1;
  62. required bool force = 2;
  63. }
  64. /**
  65. * void response
  66. */
  67. message DeleteBlockPoolResponseProto {
  68. }
  69. /**
  70. * Gets the file information where block and its metadata is stored
  71. * block - block for which path information is being requested
  72. * token - block token
  73. *
  74. * This message is deprecated in favor of file descriptor passing.
  75. */
  76. message GetBlockLocalPathInfoRequestProto {
  77. required ExtendedBlockProto block = 1;
  78. required hadoop.common.TokenProto token = 2;
  79. }
  80. /**
  81. * block - block for which file path information is being returned
  82. * localPath - file path where the block data is stored
  83. * localMetaPath - file path where the block meta data is stored
  84. *
  85. * This message is deprecated in favor of file descriptor passing.
  86. */
  87. message GetBlockLocalPathInfoResponseProto {
  88. required ExtendedBlockProto block = 1;
  89. required string localPath = 2;
  90. required string localMetaPath = 3;
  91. }
  92. /**
  93. * forUpgrade - if true, clients are advised to wait for restart and quick
  94. * upgrade restart is instrumented. Otherwise, datanode does
  95. * the regular shutdown.
  96. */
  97. message ShutdownDatanodeRequestProto {
  98. required bool forUpgrade = 1;
  99. }
  100. message ShutdownDatanodeResponseProto {
  101. }
  102. /** Tell datanode to evict active clients that are writing */
  103. message EvictWritersRequestProto {
  104. }
  105. message EvictWritersResponseProto {
  106. }
  107. /**
  108. * Ping datanode for liveness and quick info
  109. */
  110. message GetDatanodeInfoRequestProto {
  111. }
  112. message GetDatanodeInfoResponseProto {
  113. required DatanodeLocalInfoProto localInfo = 1;
  114. }
  115. message TriggerBlockReportRequestProto {
  116. required bool incremental = 1;
  117. }
  118. message TriggerBlockReportResponseProto {
  119. }
  120. message GetBalancerBandwidthRequestProto {
  121. }
  122. /**
  123. * bandwidth - balancer bandwidth value of the datanode.
  124. */
  125. message GetBalancerBandwidthResponseProto {
  126. required uint64 bandwidth = 1;
  127. }
  128. /**
  129. * This message allows a client to submit a disk
  130. * balancer plan to a data node.
  131. */
  132. message SubmitDiskBalancerPlanRequestProto {
  133. required string planID = 1; // A hash of the plan like SHA512
  134. required string plan = 2; // Json String that describes the plan
  135. optional uint64 planVersion = 3; // Plan version number
  136. optional uint64 maxDiskBandwidth = 4; // optional bandwidth control.
  137. }
  138. /**
  139. * Response from the DataNode on Plan Submit request
  140. */
  141. message SubmitDiskBalancerPlanResponseProto {
  142. }
  143. /**
  144. * Protocol used from client to the Datanode.
  145. * See the request and response for details of rpc call.
  146. */
  147. service ClientDatanodeProtocolService {
  148. /**
  149. * Returns the visible length of the replica
  150. */
  151. rpc getReplicaVisibleLength(GetReplicaVisibleLengthRequestProto)
  152. returns(GetReplicaVisibleLengthResponseProto);
  153. /**
  154. * Refresh the list of federated namenodes from updated configuration.
  155. * Adds new namenodes and stops the deleted namenodes.
  156. */
  157. rpc refreshNamenodes(RefreshNamenodesRequestProto)
  158. returns(RefreshNamenodesResponseProto);
  159. /**
  160. * Delete the block pool from the datanode.
  161. */
  162. rpc deleteBlockPool(DeleteBlockPoolRequestProto)
  163. returns(DeleteBlockPoolResponseProto);
  164. /**
  165. * Retrieves the path names of the block file and metadata file stored on the
  166. * local file system.
  167. */
  168. rpc getBlockLocalPathInfo(GetBlockLocalPathInfoRequestProto)
  169. returns(GetBlockLocalPathInfoResponseProto);
  170. rpc shutdownDatanode(ShutdownDatanodeRequestProto)
  171. returns(ShutdownDatanodeResponseProto);
  172. rpc evictWriters(EvictWritersRequestProto)
  173. returns(EvictWritersResponseProto);
  174. rpc getDatanodeInfo(GetDatanodeInfoRequestProto)
  175. returns(GetDatanodeInfoResponseProto);
  176. rpc getReconfigurationStatus(GetReconfigurationStatusRequestProto)
  177. returns(GetReconfigurationStatusResponseProto);
  178. rpc startReconfiguration(StartReconfigurationRequestProto)
  179. returns(StartReconfigurationResponseProto);
  180. rpc listReconfigurableProperties(
  181. ListReconfigurablePropertiesRequestProto)
  182. returns(ListReconfigurablePropertiesResponseProto);
  183. rpc triggerBlockReport(TriggerBlockReportRequestProto)
  184. returns(TriggerBlockReportResponseProto);
  185. /**
  186. * Returns the balancer bandwidth value of datanode.
  187. */
  188. rpc getBalancerBandwidth(GetBalancerBandwidthRequestProto)
  189. returns(GetBalancerBandwidthResponseProto);
  190. /**
  191. * Submit a disk balancer plan for execution
  192. */
  193. rpc submitDiskBalancerPlan(SubmitDiskBalancerPlanRequestProto)
  194. returns (SubmitDiskBalancerPlanResponseProto);
  195. }