/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // This file contains protocol buffers that are used for Admin service. option java_package = "org.apache.hadoop.hbase.protobuf.generated"; option java_outer_classname = "AdminProtos"; option java_generic_services = true; option java_generate_equals_and_hash = true; option optimize_for = SPEED; import "Client.proto"; import "hbase.proto"; import "WAL.proto"; message GetRegionInfoRequest { required RegionSpecifier region = 1; optional bool compactionState = 2; } message GetRegionInfoResponse { required RegionInfo regionInfo = 1; optional CompactionState compactionState = 2; enum CompactionState { NONE = 0; MINOR = 1; MAJOR = 2; MAJOR_AND_MINOR = 3; } } /** * Get a list of store files for a set of column families in a particular region. * If no column family is specified, get the store files for all column families. */ message GetStoreFileRequest { required RegionSpecifier region = 1; repeated bytes family = 2; } message GetStoreFileResponse { repeated string storeFile = 1; } message GetOnlineRegionRequest { } message GetOnlineRegionResponse { repeated RegionInfo regionInfo = 1; } message OpenRegionRequest { repeated RegionOpenInfo openInfo = 1; message RegionOpenInfo { required RegionInfo region = 1; optional uint32 versionOfOfflineNode = 2; repeated ServerName favoredNodes = 3; } } message OpenRegionResponse { repeated RegionOpeningState openingState = 1; enum RegionOpeningState { OPENED = 0; ALREADY_OPENED = 1; FAILED_OPENING = 2; } } /** * Closes the specified region and will use or not use ZK during the close * according to the specified flag. */ message CloseRegionRequest { required RegionSpecifier region = 1; optional uint32 versionOfClosingNode = 2; optional bool transitionInZK = 3 [default = true]; optional ServerName destinationServer = 4; } message CloseRegionResponse { required bool closed = 1; } /** * Flushes the MemStore of the specified region. *

* This method is synchronous. */ message FlushRegionRequest { required RegionSpecifier region = 1; optional uint64 ifOlderThanTs = 2; } message FlushRegionResponse { required uint64 lastFlushTime = 1; optional bool flushed = 2; } /** * Splits the specified region. *

* This method currently flushes the region and then forces a compaction which * will then trigger a split. The flush is done synchronously but the * compaction is asynchronous. */ message SplitRegionRequest { required RegionSpecifier region = 1; optional bytes splitPoint = 2; } message SplitRegionResponse { } /** * Compacts the specified region. Performs a major compaction if specified. *

* This method is asynchronous. */ message CompactRegionRequest { required RegionSpecifier region = 1; optional bool major = 2; optional bytes family = 3; } message CompactRegionResponse { } /** * Merges the specified regions. *

* This method currently closes the regions and then merges them */ message MergeRegionsRequest { required RegionSpecifier regionA = 1; required RegionSpecifier regionB = 2; optional bool forcible = 3 [default = false]; } message MergeRegionsResponse { } // Protocol buffer version of WAL for replication message WALEntry { required WALKey key = 1; repeated bytes keyValueBytes = 2; } /** * Replicates the given entries. The guarantee is that the given entries * will be durable on the slave cluster if this method returns without * any exception. * hbase.replication has to be set to true for this to work. */ message ReplicateWALEntryRequest { repeated WALEntry entry = 1; } message ReplicateWALEntryResponse { } message RollWALWriterRequest { } message RollWALWriterResponse { // A list of encoded name of regions to flush repeated bytes regionToFlush = 1; } message StopServerRequest { required string reason = 1; } message StopServerResponse { } message GetServerInfoRequest { } message ServerInfo { required ServerName serverName = 1; optional uint32 webuiPort = 2; } message GetServerInfoResponse { required ServerInfo serverInfo = 1; } service AdminService { rpc getRegionInfo(GetRegionInfoRequest) returns(GetRegionInfoResponse); rpc getStoreFile(GetStoreFileRequest) returns(GetStoreFileResponse); rpc getOnlineRegion(GetOnlineRegionRequest) returns(GetOnlineRegionResponse); rpc openRegion(OpenRegionRequest) returns(OpenRegionResponse); rpc closeRegion(CloseRegionRequest) returns(CloseRegionResponse); rpc flushRegion(FlushRegionRequest) returns(FlushRegionResponse); rpc splitRegion(SplitRegionRequest) returns(SplitRegionResponse); rpc compactRegion(CompactRegionRequest) returns(CompactRegionResponse); rpc mergeRegions(MergeRegionsRequest) returns(MergeRegionsResponse); rpc replicateWALEntry(ReplicateWALEntryRequest) returns(ReplicateWALEntryResponse); rpc replay(MultiRequest) returns(MultiResponse); rpc rollWALWriter(RollWALWriterRequest) returns(RollWALWriterResponse); rpc getServerInfo(GetServerInfoRequest) returns(GetServerInfoResponse); rpc stopServer(StopServerRequest) returns(StopServerResponse); }