HBASE-6036 Add Cluster-level PB-based calls to HMasterInterface (minus file-format related calls)

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1342109 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2012-05-24 00:34:08 +00:00
parent ca8882e804
commit 36bac7b88b
1 changed files with 135 additions and 0 deletions

View File

@ -0,0 +1,135 @@
/**
* 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 MasterProtocol.
option java_package = "org.apache.hadoop.hbase.protobuf.generated";
option java_outer_classname = "MasterProtos";
option java_generic_services = true;
option java_generate_equals_and_hash = true;
option optimize_for = SPEED;
import "hbase.proto";
/* Region-level Protos */
message MoveRegionRequest {
required RegionSpecifier region = 1;
optional ServerName destServerName = 2;
}
message MoveRegionResponse {
}
message AssignRegionRequest {
required RegionSpecifier region = 1;
}
message AssignRegionResponse {
}
message UnassignRegionRequest {
required RegionSpecifier region = 1;
optional bool force = 2 [default = false];
}
message UnassignRegionResponse {
}
/* Cluster-level protobufs */
message IsMasterRunningRequest {
}
message IsMasterRunningResponse {
required bool isMasterRunning = 1;
}
message ShutdownRequest {
}
message ShutdownResponse {
}
message StopMasterRequest {
}
message StopMasterResponse {
}
message BalanceRequest {
}
message BalanceResponse {
required bool balancerRan = 1;
}
message SetBalancerRunningRequest {
required bool on = 1;
optional bool synchronous = 2;
}
message SetBalancerRunningResponse {
optional bool prevBalanceValue = 1;
}
service MasterService {
/** Move the region region to the destination server. */
rpc moveRegion(MoveRegionRequest)
returns(MoveRegionResponse);
/** Assign a region to a server chosen at random. */
rpc assignRegion(AssignRegionRequest)
returns(AssignRegionResponse);
/**
* Unassign a region from current hosting regionserver. Region will then be
* assigned to a regionserver chosen at random. Region could be reassigned
* back to the same server. Use moveRegion if you want
* to control the region movement.
*/
rpc unassignRegion(UnassignRegionRequest)
returns(UnassignRegionResponse);
/** return true if master is available */
rpc isMasterRunning(IsMasterRunningRequest)
returns(IsMasterRunningResponse);
/** Shutdown an HBase cluster. */
rpc shutdown(ShutdownRequest)
returns(ShutdownResponse);
/** Stop HBase Master only. Does not shutdown the cluster. */
rpc stopMaster(StopMasterRequest)
returns(StopMasterResponse);
/**
* Run the balancer. Will run the balancer and if regions to move, it will
* go ahead and do the reassignments. Can NOT run for various reasons.
* Check logs.
*/
rpc balance(BalanceRequest)
returns(BalanceResponse);
/**
* Turn the load balancer on or off.
* If synchronous is true, it waits until current balance() call, if outstanding, to return.
*/
rpc setBalancerRunning(SetBalancerRunningRequest)
returns(SetBalancerRunningResponse);
}