hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1342109 - /hbase/trunk/src/main/protobuf/Master.proto
Date Thu, 24 May 2012 00:34:09 GMT
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



Mime
View raw message