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.
20 // This file contains protocol buffers that are used for RegionServerStatusProtocol.
23 option java_package = "org.apache.hadoop.hbase.shaded.protobuf.generated";
24 option java_outer_classname = "RegionServerStatusProtos";
25 option java_generic_services = true;
26 option java_generate_equals_and_hash = true;
27 option optimize_for = SPEED;
30 import "ClusterStatus.proto";
31 import "ErrorHandling.proto";
33 message RegionServerStartupRequest {
34 /** Port number this regionserver is up on */
35 required uint32 port = 1;
37 /** This servers' startcode */
38 required uint64 server_start_code = 2;
40 /** Current time of the region server in ms */
41 required uint64 server_current_time = 3;
43 /** hostname for region server, optional */
44 optional string use_this_hostname_instead = 4;
47 message RegionServerStartupResponse {
49 * Configuration for the regionserver to use: e.g. filesystem,
50 * hbase rootdir, the hostname to use creating the RegionServer ServerName,
53 repeated NameStringPair map_entries = 1;
56 message RegionServerReportRequest {
57 required ServerName server = 1;
59 /** load the server is under */
60 optional ServerLoad load = 2;
63 message RegionServerReportResponse {
66 message ReportRSFatalErrorRequest {
67 /** name of the server experiencing the error */
68 required ServerName server = 1;
70 /** informative text to expose in the master logs and UI */
71 required string error_message = 2;
74 message ReportRSFatalErrorResponse {
77 message GetLastFlushedSequenceIdRequest {
79 required bytes region_name = 1;
82 message GetLastFlushedSequenceIdResponse {
83 /** the last WAL sequence id flushed from MemStore to HFile for the region */
84 required uint64 last_flushed_sequence_id = 1;
86 /** the last WAL sequence id flushed from MemStore to HFile for stores of the region */
87 repeated StoreSequenceId store_last_flushed_sequence_id = 2;
90 message RegionStateTransition {
91 required TransitionCode transition_code = 1;
93 /** Mutliple regions are involved during merging/splitting */
94 repeated RegionInfo region_info = 2;
96 /** For newly opened region, the open seq num is needed */
97 optional uint64 open_seq_num = 3;
99 repeated int64 proc_id = 4;
100 enum TransitionCode {
103 /** No failed_close, in which case region server will abort */
106 /** Ask master for ok to split/merge region(s) */
111 /** We used to have PONR enums for split and merge in here occupying
112 positions 5 and 6 but they have since been removed. Do not reuse these
122 message ReportRegionStateTransitionRequest {
123 /** This region server's server name */
124 required ServerName server = 1;
126 repeated RegionStateTransition transition = 2;
129 message ReportRegionStateTransitionResponse {
130 /** Error message if failed to update the region state */
131 optional string error_message = 1;
135 message RegionSpaceUse {
136 optional RegionInfo region_info = 1; // A region identifier
137 optional uint64 region_size = 2; // The size in bytes of the region
141 * Reports filesystem usage for regions.
143 message RegionSpaceUseReportRequest {
144 repeated RegionSpaceUse space_use = 1;
147 message RegionSpaceUseReportResponse {
150 message RemoteProcedureResult {
151 required uint64 proc_id = 1;
156 required Status status = 2;
157 optional ForeignExceptionMessage error = 3;
159 message ReportProcedureDoneRequest {
160 repeated RemoteProcedureResult result = 1;
163 message ReportProcedureDoneResponse {
166 message FileArchiveNotificationRequest {
167 message FileWithSize {
168 optional TableName table_name = 1;
169 optional string name = 2;
170 optional uint64 size = 3;
172 repeated FileWithSize archived_files = 1;
175 message FileArchiveNotificationResponse {
178 service RegionServerStatusService {
179 /** Called when a region server first starts. */
180 rpc RegionServerStartup(RegionServerStartupRequest)
181 returns(RegionServerStartupResponse);
183 /** Called to report the load the RegionServer is under. */
184 rpc RegionServerReport(RegionServerReportRequest)
185 returns(RegionServerReportResponse);
188 * Called by a region server to report a fatal error that is causing it to
191 rpc ReportRSFatalError(ReportRSFatalErrorRequest)
192 returns(ReportRSFatalErrorResponse);
194 /** Called to get the sequence id of the last MemStore entry flushed to an
195 * HFile for a specified region. Used by the region server to speed up
197 rpc GetLastFlushedSequenceId(GetLastFlushedSequenceIdRequest)
198 returns(GetLastFlushedSequenceIdResponse);
201 * Called by a region server to report the progress of a region
202 * transition. If the request fails, the transition should
205 rpc ReportRegionStateTransition(ReportRegionStateTransitionRequest)
206 returns(ReportRegionStateTransitionResponse);
209 * Reports Region filesystem space use
211 rpc ReportRegionSpaceUse(RegionSpaceUseReportRequest)
212 returns(RegionSpaceUseReportResponse);
214 rpc ReportProcedureDone(ReportProcedureDoneRequest)
215 returns(ReportProcedureDoneResponse);
217 /** Reports files that were moved to the archive directory for space quotas */
218 rpc ReportFileArchival(FileArchiveNotificationRequest)
219 returns(FileArchiveNotificationResponse);