github.com/insionng/yougam@v0.0.0-20170714101924-2bc18d833463/libraries/pingcap/go-hbase/protobuf/Admin.proto (about) 1 package proto; 2 /** 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, software 14 * distributed under the License is distributed on an "AS IS" BASIS, 15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 * See the License for the specific language governing permissions and 17 * limitations under the License. 18 */ 19 20 // This file contains protocol buffers that are used for Admin service. 21 22 option java_package = "org.apache.hadoop.hbase.protobuf.generated"; 23 option java_outer_classname = "AdminProtos"; 24 option java_generic_services = true; 25 option java_generate_equals_and_hash = true; 26 option optimize_for = SPEED; 27 28 import "Client.proto"; 29 import "HBase.proto"; 30 import "WAL.proto"; 31 32 message GetRegionInfoRequest { 33 required RegionSpecifier region = 1; 34 optional bool compaction_state = 2; 35 } 36 37 message GetRegionInfoResponse { 38 required RegionInfo region_info = 1; 39 optional CompactionState compaction_state = 2; 40 optional bool isRecovering = 3; 41 42 enum CompactionState { 43 NONE = 0; 44 MINOR = 1; 45 MAJOR = 2; 46 MAJOR_AND_MINOR = 3; 47 } 48 } 49 50 /** 51 * Get a list of store files for a set of column families in a particular region. 52 * If no column family is specified, get the store files for all column families. 53 */ 54 message GetStoreFileRequest { 55 required RegionSpecifier region = 1; 56 repeated bytes family = 2; 57 } 58 59 message GetStoreFileResponse { 60 repeated string store_file = 1; 61 } 62 63 message GetOnlineRegionRequest { 64 } 65 66 message GetOnlineRegionResponse { 67 repeated RegionInfo region_info = 1; 68 } 69 70 message OpenRegionRequest { 71 repeated RegionOpenInfo open_info = 1; 72 // the intended server for this RPC. 73 optional uint64 serverStartCode = 2; 74 75 message RegionOpenInfo { 76 required RegionInfo region = 1; 77 optional uint32 version_of_offline_node = 2; 78 repeated ServerName favored_nodes = 3; 79 // open region for distributedLogReplay 80 optional bool openForDistributedLogReplay = 4; 81 } 82 } 83 84 message OpenRegionResponse { 85 repeated RegionOpeningState opening_state = 1; 86 87 enum RegionOpeningState { 88 OPENED = 0; 89 ALREADY_OPENED = 1; 90 FAILED_OPENING = 2; 91 } 92 } 93 94 /** 95 * Closes the specified region and will use or not use ZK during the close 96 * according to the specified flag. 97 */ 98 message CloseRegionRequest { 99 required RegionSpecifier region = 1; 100 optional uint32 version_of_closing_node = 2; 101 optional bool transition_in_ZK = 3 [default = true]; 102 optional ServerName destination_server = 4; 103 // the intended server for this RPC. 104 optional uint64 serverStartCode = 5; 105 } 106 107 message CloseRegionResponse { 108 required bool closed = 1; 109 } 110 111 /** 112 * Flushes the MemStore of the specified region. 113 * <p> 114 * This method is synchronous. 115 */ 116 message FlushRegionRequest { 117 required RegionSpecifier region = 1; 118 optional uint64 if_older_than_ts = 2; 119 } 120 121 message FlushRegionResponse { 122 required uint64 last_flush_time = 1; 123 optional bool flushed = 2; 124 } 125 126 /** 127 * Splits the specified region. 128 * <p> 129 * This method currently flushes the region and then forces a compaction which 130 * will then trigger a split. The flush is done synchronously but the 131 * compaction is asynchronous. 132 */ 133 message SplitRegionRequest { 134 required RegionSpecifier region = 1; 135 optional bytes split_point = 2; 136 } 137 138 message SplitRegionResponse { 139 } 140 141 /** 142 * Compacts the specified region. Performs a major compaction if specified. 143 * <p> 144 * This method is asynchronous. 145 */ 146 message CompactRegionRequest { 147 required RegionSpecifier region = 1; 148 optional bool major = 2; 149 optional bytes family = 3; 150 } 151 152 message CompactRegionResponse { 153 } 154 155 message UpdateFavoredNodesRequest { 156 repeated RegionUpdateInfo update_info = 1; 157 158 message RegionUpdateInfo { 159 required RegionInfo region = 1; 160 repeated ServerName favored_nodes = 2; 161 } 162 } 163 164 message UpdateFavoredNodesResponse { 165 optional uint32 response = 1; 166 } 167 168 /** 169 * Merges the specified regions. 170 * <p> 171 * This method currently closes the regions and then merges them 172 */ 173 message MergeRegionsRequest { 174 required RegionSpecifier region_a = 1; 175 required RegionSpecifier region_b = 2; 176 optional bool forcible = 3 [default = false]; 177 } 178 179 message MergeRegionsResponse { 180 } 181 182 // Protocol buffer version of WAL for replication 183 message WALEntry { 184 required WALKey key = 1; 185 // Following may be null if the KVs/Cells are carried along the side in a cellblock (See 186 // RPC for more on cellblocks). If Cells/KVs are in a cellblock, this next field is null 187 // and associated_cell_count has count of Cells associated w/ this WALEntry 188 repeated bytes key_value_bytes = 2; 189 // If Cell data is carried alongside in a cellblock, this is count of Cells in the cellblock. 190 optional int32 associated_cell_count = 3; 191 } 192 193 /** 194 * Replicates the given entries. The guarantee is that the given entries 195 * will be durable on the slave cluster if this method returns without 196 * any exception. hbase.replication has to be set to true for this to work. 197 */ 198 message ReplicateWALEntryRequest { 199 repeated WALEntry entry = 1; 200 } 201 202 message ReplicateWALEntryResponse { 203 } 204 205 message RollWALWriterRequest { 206 } 207 208 message RollWALWriterResponse { 209 // A list of encoded name of regions to flush 210 repeated bytes region_to_flush = 1; 211 } 212 213 message StopServerRequest { 214 required string reason = 1; 215 } 216 217 message StopServerResponse { 218 } 219 220 message GetServerInfoRequest { 221 } 222 223 message ServerInfo { 224 required ServerName server_name = 1; 225 optional uint32 webui_port = 2; 226 } 227 228 message GetServerInfoResponse { 229 required ServerInfo server_info = 1; 230 } 231 232 service AdminService { 233 rpc GetRegionInfo(GetRegionInfoRequest) 234 returns(GetRegionInfoResponse); 235 236 rpc GetStoreFile(GetStoreFileRequest) 237 returns(GetStoreFileResponse); 238 239 rpc GetOnlineRegion(GetOnlineRegionRequest) 240 returns(GetOnlineRegionResponse); 241 242 rpc OpenRegion(OpenRegionRequest) 243 returns(OpenRegionResponse); 244 245 rpc CloseRegion(CloseRegionRequest) 246 returns(CloseRegionResponse); 247 248 rpc FlushRegion(FlushRegionRequest) 249 returns(FlushRegionResponse); 250 251 rpc SplitRegion(SplitRegionRequest) 252 returns(SplitRegionResponse); 253 254 rpc CompactRegion(CompactRegionRequest) 255 returns(CompactRegionResponse); 256 257 rpc MergeRegions(MergeRegionsRequest) 258 returns(MergeRegionsResponse); 259 260 rpc ReplicateWALEntry(ReplicateWALEntryRequest) 261 returns(ReplicateWALEntryResponse); 262 263 rpc Replay(ReplicateWALEntryRequest) 264 returns(ReplicateWALEntryResponse); 265 266 rpc RollWALWriter(RollWALWriterRequest) 267 returns(RollWALWriterResponse); 268 269 rpc GetServerInfo(GetServerInfoRequest) 270 returns(GetServerInfoResponse); 271 272 rpc StopServer(StopServerRequest) 273 returns(StopServerResponse); 274 275 rpc UpdateFavoredNodes(UpdateFavoredNodesRequest) 276 returns(UpdateFavoredNodesResponse); 277 }