Return-Path: X-Original-To: apmail-hbase-commits-archive@www.apache.org Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E0B3FC60D for ; Thu, 24 May 2012 00:34:30 +0000 (UTC) Received: (qmail 49212 invoked by uid 500); 24 May 2012 00:34:30 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 49183 invoked by uid 500); 24 May 2012 00:34:30 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 49176 invoked by uid 99); 24 May 2012 00:34:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 May 2012 00:34:30 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 May 2012 00:34:29 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 45B472388B9B for ; Thu, 24 May 2012 00:34:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1342109 - /hbase/trunk/src/main/protobuf/Master.proto Date: Thu, 24 May 2012 00:34:09 -0000 To: commits@hbase.apache.org From: stack@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120524003409.45B472388B9B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: stack Date: Thu May 24 00:34:08 2012 New Revision: 1342109 URL: http://svn.apache.org/viewvc?rev=1342109&view=rev Log: HBASE-6036 Add Cluster-level PB-based calls to HMasterInterface (minus file-format related calls) Added: hbase/trunk/src/main/protobuf/Master.proto Added: hbase/trunk/src/main/protobuf/Master.proto URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/protobuf/Master.proto?rev=1342109&view=auto ============================================================================== --- hbase/trunk/src/main/protobuf/Master.proto (added) +++ hbase/trunk/src/main/protobuf/Master.proto Thu May 24 00:34:08 2012 @@ -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); +} \ No newline at end of file