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
10 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 // This file contains protocol buffers that are used for ClustStatus
22 option java_package = "org.apache.hadoop.hbase.shaded.protobuf.generated";
23 option java_outer_classname = "ClusterStatusProtos";
24 option java_generate_equals_and_hash = true;
25 option optimize_for = SPEED;
28 import "ClusterId.proto";
32 required RegionInfo region_info = 1;
33 required State state = 2;
34 optional uint64 stamp = 3;
36 OFFLINE = 0; // region is in an offline state
37 PENDING_OPEN = 1; // sent rpc to server to open but has not begun
38 OPENING = 2; // server has begun to open but not yet done
39 OPEN = 3; // server opened region and updated meta
40 PENDING_CLOSE = 4; // sent rpc to server to close but has not begun
41 CLOSING = 5; // server has begun to close but not yet done
42 CLOSED = 6; // server closed region and updated meta
43 SPLITTING = 7; // server started split of a region
44 SPLIT = 8; // server completed split of a region
45 FAILED_OPEN = 9; // failed to open, and won't retry any more
46 FAILED_CLOSE = 10; // failed to close, and won't retry any more
47 MERGING = 11; // server started merge a region
48 MERGED = 12; // server completed merge of a region
49 SPLITTING_NEW = 13; // new region to be created when RS splits a parent
50 // region but hasn't be created yet, or master doesn't
51 // know it's already created
52 MERGING_NEW = 14; // new region to be created when RS merges two
53 // daughter regions but hasn't be created yet, or
54 // master doesn't know it's already created
55 ABNORMALLY_CLOSED = 15;// the region is CLOSED because of a RS crash. Usually it is the same
56 // with CLOSED, but for some operations such as merge/split, we can not
57 // apply it to a region in this state, as it may lead to data loss as we
58 // may have some data in recovered edits.
62 message RegionInTransition {
63 required RegionSpecifier spec = 1;
64 required RegionState region_state = 2;
68 * sequence Id of a store
70 message StoreSequenceId {
71 required bytes family_name = 1;
72 required uint64 sequence_id = 2;
76 * contains a sequence id of a region which should be the minimum of its store sequence ids and
77 * list of sequence ids of the region's stores
79 message RegionStoreSequenceIds {
80 required uint64 last_flushed_sequence_id = 1;
81 repeated StoreSequenceId store_sequence_id = 2;
85 /** the region specifier */
86 required RegionSpecifier region_specifier = 1;
88 /** the number of stores for the region */
89 optional uint32 stores = 2;
91 /** the number of storefiles for the region */
92 optional uint32 storefiles = 3;
94 /** the total size of the store files for the region, uncompressed, in MB */
95 optional uint32 store_uncompressed_size_MB = 4;
97 /** the current total size of the store files for the region, in MB */
98 optional uint32 storefile_size_MB = 5;
100 /** the current size of the memstore for the region, in MB */
101 optional uint32 mem_store_size_MB = 6;
104 * The current total size of root-level store file indexes for the region,
105 * in KB. The same as {@link #rootIndexSizeKB}.
107 optional uint64 storefile_index_size_KB = 7;
109 /** the current total read requests made to region */
110 optional uint64 read_requests_count = 8;
112 /** the current total write requests made to region */
113 optional uint64 write_requests_count = 9;
115 /** the total compacting key values in currently running compaction */
116 optional uint64 total_compacting_KVs = 10;
118 /** the completed count of key values in currently running compaction */
119 optional uint64 current_compacted_KVs = 11;
121 /** The current total size of root-level indexes for the region, in KB. */
122 optional uint32 root_index_size_KB = 12;
124 /** The total size of all index blocks, not just the root level, in KB. */
125 optional uint32 total_static_index_size_KB = 13;
128 * The total size of all Bloom filter blocks, not just loaded into the
129 * block cache, in KB.
131 optional uint32 total_static_bloom_size_KB = 14;
133 /** the most recent sequence Id from cache flush */
134 optional uint64 complete_sequence_id = 15;
136 /** The current data locality for region in the regionserver */
137 optional float data_locality = 16;
139 optional uint64 last_major_compaction_ts = 17 [default = 0];
141 /** the most recent sequence Id of store from cache flush */
142 repeated StoreSequenceId store_complete_sequence_id = 18;
144 /** the current total filtered read requests made to region */
145 optional uint64 filtered_read_requests_count = 19;
147 /** the current total coprocessor requests made to region */
148 optional uint64 cp_requests_count = 20;
150 /** the number of references active on the store */
151 optional int32 store_ref_count = 21 [default = 0];
154 * The max number of references active on single store file among all compacted store files
155 * that belong to given region
157 optional int32 max_compacted_store_file_ref_count = 22 [default = 0];
162 /** short user name */
163 required string userName = 1;
165 /** Metrics for all clients of a user */
166 repeated ClientMetrics clientMetrics = 2;
169 message ClientMetrics {
170 /** client host name */
171 required string hostName = 1;
173 /** the current total read requests made from a client */
174 optional uint64 read_requests_count = 2;
176 /** the current total write requests made from a client */
177 optional uint64 write_requests_count = 3;
179 /** the current total filtered requests made from a client */
180 optional uint64 filtered_requests_count = 4;
183 /* Server-level protobufs */
185 message ReplicationLoadSink {
186 required uint64 ageOfLastAppliedOp = 1;
187 required uint64 timeStampsOfLastAppliedOp = 2;
190 message ReplicationLoadSource {
191 required string peerID = 1;
192 required uint64 ageOfLastShippedOp = 2;
193 required uint32 sizeOfLogQueue = 3;
194 required uint64 timeStampOfLastShippedOp = 4;
195 required uint64 replicationLag = 5;
196 optional uint64 timeStampOfNextToReplicate=6;
197 optional string queueId = 7;
198 optional bool recovered = 8;
199 optional bool running = 9;
200 optional bool editsSinceRestart = 10;
201 optional uint64 editsRead = 11;
202 optional uint64 oPsShipped = 12;
206 /** Number of requests since last report. */
207 optional uint64 number_of_requests = 1;
209 /** Total Number of requests from the start of the region server. */
210 optional uint64 total_number_of_requests = 2;
212 /** the amount of used heap, in MB. */
213 optional uint32 used_heap_MB = 3;
215 /** the maximum allowable size of the heap, in MB. */
216 optional uint32 max_heap_MB = 4;
218 /** Information on the load of individual regions. */
219 repeated RegionLoad region_loads = 5;
222 * Regionserver-level coprocessors, e.g., WALObserver implementations.
223 * Region-level coprocessors, on the other hand, are stored inside RegionLoad
226 repeated Coprocessor coprocessors = 6;
229 * Time when incremental (non-total) counts began being calculated (e.g. number_of_requests)
230 * time is measured as the difference, measured in milliseconds, between the current time
231 * and midnight, January 1, 1970 UTC.
233 optional uint64 report_start_time = 7;
236 * Time when report was generated.
237 * time is measured as the difference, measured in milliseconds, between the current time
238 * and midnight, January 1, 1970 UTC.
240 optional uint64 report_end_time = 8;
243 * The port number that this region server is hosing an info server on.
245 optional uint32 info_server_port = 9;
248 * The replicationLoadSource for the replication Source status of this region server.
250 repeated ReplicationLoadSource replLoadSource = 10;
253 * The replicationLoadSink for the replication Sink status of this region server.
255 optional ReplicationLoadSink replLoadSink = 11;
258 * The metrics for each user on this region server
260 repeated UserLoad userLoads = 12;
263 message LiveServerInfo {
264 required ServerName server = 1;
265 required ServerLoad server_load = 2;
268 message RegionStatesCount {
269 required uint32 open_regions = 1;
270 required uint32 split_regions = 2;
271 required uint32 closed_regions = 3;
272 required uint32 regions_in_transition = 4;
273 required uint32 total_regions = 5;
276 message TableRegionStatesCount {
277 required TableName table_name = 1;
278 required RegionStatesCount region_states_count = 2;
281 message ClusterStatus {
282 optional HBaseVersionFileContent hbase_version = 1;
283 repeated LiveServerInfo live_servers = 2;
284 repeated ServerName dead_servers = 3;
285 repeated RegionInTransition regions_in_transition = 4;
286 optional ClusterId cluster_id = 5;
287 repeated Coprocessor master_coprocessors = 6;
288 optional ServerName master = 7;
289 repeated ServerName backup_masters = 8;
290 optional bool balancer_on = 9;
291 optional int32 master_info_port = 10 [default = -1];
292 repeated ServerName servers_name = 11;
293 repeated TableRegionStatesCount table_region_states_count = 12;
303 MASTER_COPROCESSORS = 6;
304 REGIONS_IN_TRANSITION = 7;
306 MASTER_INFO_PORT = 9;
308 TABLE_TO_REGIONS_COUNT = 11;