ClusterStatus.proto 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  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. // This file contains protocol buffers that are used for ClustStatus
  19. package pb;
  20. option java_package = "org.apache.hadoop.hbase.protobuf.generated";
  21. option java_outer_classname = "ClusterStatusProtos";
  22. option java_generate_equals_and_hash = true;
  23. option optimize_for = SPEED;
  24. import "HBase.proto";
  25. import "ClusterId.proto";
  26. import "FS.proto";
  27. message RegionState {
  28. required RegionInfo region_info = 1;
  29. required State state = 2;
  30. optional uint64 stamp = 3;
  31. enum State {
  32. OFFLINE = 0; // region is in an offline state
  33. PENDING_OPEN = 1; // sent rpc to server to open but has not begun
  34. OPENING = 2; // server has begun to open but not yet done
  35. OPEN = 3; // server opened region and updated meta
  36. PENDING_CLOSE = 4; // sent rpc to server to close but has not begun
  37. CLOSING = 5; // server has begun to close but not yet done
  38. CLOSED = 6; // server closed region and updated meta
  39. SPLITTING = 7; // server started split of a region
  40. SPLIT = 8; // server completed split of a region
  41. FAILED_OPEN = 9; // failed to open, and won't retry any more
  42. FAILED_CLOSE = 10; // failed to close, and won't retry any more
  43. MERGING = 11; // server started merge a region
  44. MERGED = 12; // server completed merge of a region
  45. SPLITTING_NEW = 13; // new region to be created when RS splits a parent
  46. // region but hasn't be created yet, or master doesn't
  47. // know it's already created
  48. MERGING_NEW = 14; // new region to be created when RS merges two
  49. // daughter regions but hasn't be created yet, or
  50. // master doesn't know it's already created
  51. }
  52. }
  53. message RegionInTransition {
  54. required RegionSpecifier spec = 1;
  55. required RegionState region_state = 2;
  56. }
  57. /**
  58. * sequence Id of a store
  59. */
  60. message StoreSequenceId {
  61. required bytes family_name = 1;
  62. required uint64 sequence_id = 2;
  63. }
  64. /**
  65. * contains a sequence id of a region which should be the minimum of its store sequence ids and
  66. * list of sequence ids of the region's stores
  67. */
  68. message RegionStoreSequenceIds {
  69. required uint64 last_flushed_sequence_id = 1;
  70. repeated StoreSequenceId store_sequence_id = 2;
  71. }
  72. message RegionLoad {
  73. /** the region specifier */
  74. required RegionSpecifier region_specifier = 1;
  75. /** the number of stores for the region */
  76. optional uint32 stores = 2;
  77. /** the number of storefiles for the region */
  78. optional uint32 storefiles = 3;
  79. /** the total size of the store files for the region, uncompressed, in MB */
  80. optional uint32 store_uncompressed_size_MB = 4;
  81. /** the current total size of the store files for the region, in MB */
  82. optional uint32 storefile_size_MB = 5;
  83. /** the current size of the memstore for the region, in MB */
  84. optional uint32 memstore_size_MB = 6;
  85. /**
  86. * The current total size of root-level store file indexes for the region,
  87. * in MB. The same as {@link #rootIndexSizeKB} but in MB.
  88. */
  89. optional uint32 storefile_index_size_MB = 7;
  90. /** the current total read requests made to region */
  91. optional uint64 read_requests_count = 8;
  92. /** the current total write requests made to region */
  93. optional uint64 write_requests_count = 9;
  94. /** the total compacting key values in currently running compaction */
  95. optional uint64 total_compacting_KVs = 10;
  96. /** the completed count of key values in currently running compaction */
  97. optional uint64 current_compacted_KVs = 11;
  98. /** The current total size of root-level indexes for the region, in KB. */
  99. optional uint32 root_index_size_KB = 12;
  100. /** The total size of all index blocks, not just the root level, in KB. */
  101. optional uint32 total_static_index_size_KB = 13;
  102. /**
  103. * The total size of all Bloom filter blocks, not just loaded into the
  104. * block cache, in KB.
  105. */
  106. optional uint32 total_static_bloom_size_KB = 14;
  107. /** the most recent sequence Id from cache flush */
  108. optional uint64 complete_sequence_id = 15;
  109. /** The current data locality for region in the regionserver */
  110. optional float data_locality = 16;
  111. optional uint64 last_major_compaction_ts = 17 [default = 0];
  112. /** the most recent sequence Id of store from cache flush */
  113. repeated StoreSequenceId store_complete_sequence_id = 18;
  114. }
  115. /* Server-level protobufs */
  116. message ReplicationLoadSink {
  117. required uint64 ageOfLastAppliedOp = 1;
  118. required uint64 timeStampsOfLastAppliedOp = 2;
  119. }
  120. message ReplicationLoadSource {
  121. required string peerID = 1;
  122. required uint64 ageOfLastShippedOp = 2;
  123. required uint32 sizeOfLogQueue = 3;
  124. required uint64 timeStampOfLastShippedOp = 4;
  125. required uint64 replicationLag = 5;
  126. }
  127. message ServerLoad {
  128. /** Number of requests since last report. */
  129. optional uint64 number_of_requests = 1;
  130. /** Total Number of requests from the start of the region server. */
  131. optional uint64 total_number_of_requests = 2;
  132. /** the amount of used heap, in MB. */
  133. optional uint32 used_heap_MB = 3;
  134. /** the maximum allowable size of the heap, in MB. */
  135. optional uint32 max_heap_MB = 4;
  136. /** Information on the load of individual regions. */
  137. repeated RegionLoad region_loads = 5;
  138. /**
  139. * Regionserver-level coprocessors, e.g., WALObserver implementations.
  140. * Region-level coprocessors, on the other hand, are stored inside RegionLoad
  141. * objects.
  142. */
  143. repeated Coprocessor coprocessors = 6;
  144. /**
  145. * Time when incremental (non-total) counts began being calculated (e.g. number_of_requests)
  146. * time is measured as the difference, measured in milliseconds, between the current time
  147. * and midnight, January 1, 1970 UTC.
  148. */
  149. optional uint64 report_start_time = 7;
  150. /**
  151. * Time when report was generated.
  152. * time is measured as the difference, measured in milliseconds, between the current time
  153. * and midnight, January 1, 1970 UTC.
  154. */
  155. optional uint64 report_end_time = 8;
  156. /**
  157. * The port number that this region server is hosing an info server on.
  158. */
  159. optional uint32 info_server_port = 9;
  160. /**
  161. * The replicationLoadSource for the replication Source status of this region server.
  162. */
  163. repeated ReplicationLoadSource replLoadSource = 10;
  164. /**
  165. * The replicationLoadSink for the replication Sink status of this region server.
  166. */
  167. optional ReplicationLoadSink replLoadSink = 11;
  168. }
  169. message LiveServerInfo {
  170. required ServerName server = 1;
  171. required ServerLoad server_load = 2;
  172. }
  173. message ClusterStatus {
  174. optional HBaseVersionFileContent hbase_version = 1;
  175. repeated LiveServerInfo live_servers = 2;
  176. repeated ServerName dead_servers = 3;
  177. repeated RegionInTransition regions_in_transition = 4;
  178. optional ClusterId cluster_id = 5;
  179. repeated Coprocessor master_coprocessors = 6;
  180. optional ServerName master = 7;
  181. repeated ServerName backup_masters = 8;
  182. optional bool balancer_on = 9;
  183. }