diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/MasterAdminProtocol.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/MasterAdminProtocol.java
index 57d83ef..95304ce 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/MasterAdminProtocol.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/MasterAdminProtocol.java
@@ -21,52 +21,9 @@ package org.apache.hadoop.hbase;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.MasterAdminService;
-import org.apache.hadoop.hbase.security.TokenInfo;
+import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.MasterService;
import org.apache.hadoop.hbase.security.KerberosInfo;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.AddColumnRequest;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.AddColumnResponse;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.CatalogScanRequest;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.CatalogScanResponse;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.CreateTableRequest;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.CreateTableResponse;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.DeleteColumnRequest;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.DeleteColumnResponse;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.AssignRegionRequest;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.AssignRegionResponse;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.DeleteTableRequest;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.DeleteTableResponse;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.DisableTableRequest;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.DisableTableResponse;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.EnableCatalogJanitorRequest;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.EnableCatalogJanitorResponse;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.EnableTableRequest;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.EnableTableResponse;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.IsCatalogJanitorEnabledRequest;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.IsCatalogJanitorEnabledResponse;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.ModifyColumnRequest;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.ModifyColumnResponse;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.ModifyTableRequest;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.ModifyTableResponse;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.MoveRegionRequest;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.MoveRegionResponse;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.OfflineRegionRequest;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.OfflineRegionResponse;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.SetBalancerRunningRequest;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.SetBalancerRunningResponse;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.UnassignRegionRequest;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.UnassignRegionResponse;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.BalanceRequest;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.BalanceResponse;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.ShutdownRequest;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.ShutdownResponse;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.StopMasterRequest;
-import org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos.StopMasterResponse;
-import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.IsMasterRunningRequest;
-import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.IsMasterRunningResponse;
-
-
-import com.google.protobuf.RpcController;
-import com.google.protobuf.ServiceException;
+import org.apache.hadoop.hbase.security.TokenInfo;
/**
* Protocol that a client uses to communicate with the Master (for admin purposes).
@@ -77,273 +34,6 @@ import com.google.protobuf.ServiceException;
@InterfaceAudience.Private
@InterfaceStability.Evolving
public interface MasterAdminProtocol extends
- MasterAdminService.BlockingInterface, MasterProtocol {
+ MasterAdminService.BlockingInterface, MasterService.BlockingInterface {
public static final long VERSION = 1L;
-
- /* Column-level */
-
- /**
- * Adds a column to the specified table
- * @param controller Unused (set to null).
- * @param req AddColumnRequest that contains:
- * - tableName: table to modify
- * - column: column descriptor
- * @throws ServiceException
- */
- @Override
- public AddColumnResponse addColumn(RpcController controller, AddColumnRequest req)
- throws ServiceException;
-
- /**
- * Deletes a column from the specified table. Table must be disabled.
- * @param controller Unused (set to null).
- * @param req DeleteColumnRequest that contains:
- * - tableName: table to alter
- * - columnName: column family to remove
- * @throws ServiceException
- */
- @Override
- public DeleteColumnResponse deleteColumn(RpcController controller, DeleteColumnRequest req)
- throws ServiceException;
-
- /**
- * Modifies an existing column on the specified table
- * @param controller Unused (set to null).
- * @param req ModifyColumnRequest that contains:
- * - tableName: table name
- * - descriptor: new column descriptor
- * @throws ServiceException e
- */
- @Override
- public ModifyColumnResponse modifyColumn(RpcController controller, ModifyColumnRequest req)
- throws ServiceException;
-
- /* Region-level */
-
- /**
- * Move a region to a specified destination server.
- * @param controller Unused (set to null).
- * @param req The request that contains:
- * - region: The encoded region name; i.e. the hash that makes
- * up the region name suffix: e.g. if regionname is
- * TestTable,0094429456,1289497600452.527db22f95c8a9e0116f0cc13c680396.,
- * then the encoded region name is: 527db22f95c8a9e0116f0cc13c680396.
- * - destServerName: The servername of the destination regionserver. If
- * passed the empty byte array we'll assign to a random server. A server name
- * is made of host, port and startcode. Here is an example:
- * host187.example.com,60020,1289493121758.
- * @throws ServiceException that wraps a UnknownRegionException if we can't find a
- * region named encodedRegionName
- */
- @Override
- public MoveRegionResponse moveRegion(RpcController controller, MoveRegionRequest req)
- throws ServiceException;
-
- /**
- * Assign a region to a server chosen at random.
- * @param controller Unused (set to null).
- * @param req contains the region to assign. Will use existing RegionPlan if one
- * found.
- * @throws ServiceException
- */
- @Override
- public AssignRegionResponse assignRegion(RpcController controller, AssignRegionRequest req)
- throws ServiceException;
-
- /**
- * 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 {@link #moveRegion} if you want to
- * control the region movement.
- * @param controller Unused (set to null).
- * @param req The request that contains:
- * - region: Region to unassign. Will clear any existing RegionPlan
- * if one found.
- * - force: If true, force unassign (Will remove region from
- * regions-in-transition too if present as well as from assigned regions --
- * radical!.If results in double assignment use hbck -fix to resolve.
- * @throws ServiceException
- */
- @Override
- public UnassignRegionResponse unassignRegion(RpcController controller, UnassignRegionRequest req)
- throws ServiceException;
-
- /**
- * Offline a region from the assignment manager's in-memory state. The
- * region should be in a closed state and there will be no attempt to
- * automatically reassign the region as in unassign. This is a special
- * method, and should only be used by experts or hbck.
- * @param controller Unused (set to null).
- * @param request OfflineRegionRequest that contains:
- * - region: Region to offline. Will clear any existing RegionPlan
- * if one found.
- * @throws ServiceException
- */
- @Override
- public OfflineRegionResponse offlineRegion(RpcController controller, OfflineRegionRequest request)
- throws ServiceException;
-
- /* Table-level */
-
- /**
- * Creates a new table asynchronously. If splitKeys are specified, then the
- * table will be created with an initial set of multiple regions.
- * If splitKeys is null, the table will be created with a single region.
- * @param controller Unused (set to null).
- * @param req CreateTableRequest that contains:
- * - tablesSchema: table descriptor
- * - splitKeys
- * @throws ServiceException
- */
- @Override
- public CreateTableResponse createTable(RpcController controller, CreateTableRequest req)
- throws ServiceException;
-
- /**
- * Deletes a table
- * @param controller Unused (set to null).
- * @param req DeleteTableRequest that contains:
- * - tableName: table to delete
- * @throws ServiceException
- */
- @Override
- public DeleteTableResponse deleteTable(RpcController controller, DeleteTableRequest req)
- throws ServiceException;
-
- /**
- * Puts the table on-line (only needed if table has been previously taken offline)
- * @param controller Unused (set to null).
- * @param req EnableTableRequest that contains:
- * - tableName: table to enable
- * @throws ServiceException
- */
- @Override
- public EnableTableResponse enableTable(RpcController controller, EnableTableRequest req)
- throws ServiceException;
-
- /**
- * Take table offline
- *
- * @param controller Unused (set to null).
- * @param req DisableTableRequest that contains:
- * - tableName: table to take offline
- * @throws ServiceException
- */
- @Override
- public DisableTableResponse disableTable(RpcController controller, DisableTableRequest req)
- throws ServiceException;
-
- /**
- * Modify a table's metadata
- *
- * @param controller Unused (set to null).
- * @param req ModifyTableRequest that contains:
- * - tableName: table to modify
- * - tableSchema: new descriptor for table
- * @throws ServiceException
- */
- @Override
- public ModifyTableResponse modifyTable(RpcController controller, ModifyTableRequest req)
- throws ServiceException;
-
- /* Cluster-level */
-
- /**
- * Shutdown an HBase cluster.
- * @param controller Unused (set to null).
- * @param request ShutdownRequest
- * @return ShutdownResponse
- * @throws ServiceException
- */
- @Override
- public ShutdownResponse shutdown(RpcController controller, ShutdownRequest request)
- throws ServiceException;
-
- /**
- * Stop HBase Master only.
- * Does not shutdown the cluster.
- * @param controller Unused (set to null).
- * @param request StopMasterRequest
- * @return StopMasterResponse
- * @throws ServiceException
- */
- @Override
- public StopMasterResponse stopMaster(RpcController controller, StopMasterRequest request)
- throws ServiceException;
-
- /**
- * 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.
- * @param c Unused (set to null).
- * @param request BalanceRequest
- * @return BalanceResponse that contains:
- * - balancerRan: True if balancer ran and was able to tell the region servers to
- * unassign all the regions to balance (the re-assignment itself is async),
- * false otherwise.
- */
- @Override
- public BalanceResponse balance(RpcController c, BalanceRequest request) throws ServiceException;
-
- /**
- * Turn the load balancer on or off.
- * @param controller Unused (set to null).
- * @param req SetBalancerRunningRequest that contains:
- * - on: If true, enable balancer. If false, disable balancer.
- * - synchronous: if true, wait until current balance() call, if outstanding, to return.
- * @return SetBalancerRunningResponse that contains:
- * - prevBalanceValue: Previous balancer value
- * @throws ServiceException
- */
- @Override
- public SetBalancerRunningResponse setBalancerRunning(
- RpcController controller, SetBalancerRunningRequest req) throws ServiceException;
-
- /**
- * @param c Unused (set to null).
- * @param req IsMasterRunningRequest
- * @return IsMasterRunningRequest that contains:
- * isMasterRunning: true if master is available
- * @throws ServiceException
- */
- @Override
- public IsMasterRunningResponse isMasterRunning(RpcController c, IsMasterRunningRequest req)
- throws ServiceException;
-
- /**
- * Run a scan of the catalog table
- * @param c Unused (set to null).
- * @param req CatalogScanRequest
- * @return CatalogScanResponse that contains the int return code corresponding
- * to the number of entries cleaned
- * @throws ServiceException
- */
- @Override
- public CatalogScanResponse runCatalogScan(RpcController c,
- CatalogScanRequest req) throws ServiceException;
-
- /**
- * Enable/Disable the catalog janitor
- * @param c Unused (set to null).
- * @param req EnableCatalogJanitorRequest that contains:
- * - enable: If true, enable catalog janitor. If false, disable janitor.
- * @return EnableCatalogJanitorResponse that contains:
- * - prevValue: true, if it was enabled previously; false, otherwise
- * @throws ServiceException
- */
- @Override
- public EnableCatalogJanitorResponse enableCatalogJanitor(RpcController c,
- EnableCatalogJanitorRequest req) throws ServiceException;
-
- /**
- * Query whether the catalog janitor is enabled
- * @param c Unused (set to null).
- * @param req IsCatalogJanitorEnabledRequest
- * @return IsCatalogCatalogJanitorEnabledResponse that contains:
- * - value: true, if it is enabled; false, otherwise
- * @throws ServiceException
- */
- @Override
- public IsCatalogJanitorEnabledResponse isCatalogJanitorEnabled(RpcController c,
- IsCatalogJanitorEnabledRequest req) throws ServiceException;
}
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/MasterMonitorProtocol.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/MasterMonitorProtocol.java
index d8cff7d..10723fd 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/MasterMonitorProtocol.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/MasterMonitorProtocol.java
@@ -21,19 +21,9 @@ package org.apache.hadoop.hbase;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
import org.apache.hadoop.hbase.protobuf.generated.MasterMonitorProtos.MasterMonitorService;
-import org.apache.hadoop.hbase.security.TokenInfo;
+import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.MasterService;
import org.apache.hadoop.hbase.security.KerberosInfo;
-import org.apache.hadoop.hbase.protobuf.generated.MasterMonitorProtos.GetSchemaAlterStatusRequest;
-import org.apache.hadoop.hbase.protobuf.generated.MasterMonitorProtos.GetSchemaAlterStatusResponse;
-import org.apache.hadoop.hbase.protobuf.generated.MasterMonitorProtos.GetTableDescriptorsRequest;
-import org.apache.hadoop.hbase.protobuf.generated.MasterMonitorProtos.GetTableDescriptorsResponse;
-import org.apache.hadoop.hbase.protobuf.generated.MasterMonitorProtos.GetClusterStatusRequest;
-import org.apache.hadoop.hbase.protobuf.generated.MasterMonitorProtos.GetClusterStatusResponse;
-import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.IsMasterRunningRequest;
-import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.IsMasterRunningResponse;
-
-import com.google.protobuf.RpcController;
-import com.google.protobuf.ServiceException;
+import org.apache.hadoop.hbase.security.TokenInfo;
/**
* Protocol that a client uses to communicate with the Master (for monitoring purposes).
@@ -44,56 +34,6 @@ import com.google.protobuf.ServiceException;
@InterfaceAudience.Public
@InterfaceStability.Evolving
public interface MasterMonitorProtocol extends
- MasterMonitorService.BlockingInterface, MasterProtocol {
+ MasterMonitorService.BlockingInterface, MasterService.BlockingInterface {
public static final long VERSION = 1L;
-
- /**
- * Used by the client to get the number of regions that have received the
- * updated schema
- *
- * @param controller Unused (set to null).
- * @param req GetSchemaAlterStatusRequest that contains:
- * - tableName
- * @return GetSchemaAlterStatusResponse indicating the number of regions updated.
- * yetToUpdateRegions is the regions that are yet to be updated totalRegions
- * is the total number of regions of the table
- * @throws ServiceException
- */
- @Override
- public GetSchemaAlterStatusResponse getSchemaAlterStatus(
- RpcController controller, GetSchemaAlterStatusRequest req) throws ServiceException;
-
- /**
- * Get list of TableDescriptors for requested tables.
- * @param controller Unused (set to null).
- * @param req GetTableDescriptorsRequest that contains:
- * - tableNames: requested tables, or if empty, all are requested
- * @return GetTableDescriptorsResponse
- * @throws ServiceException
- */
- @Override
- public GetTableDescriptorsResponse getTableDescriptors(
- RpcController controller, GetTableDescriptorsRequest req) throws ServiceException;
-
- /**
- * Return cluster status.
- * @param controller Unused (set to null).
- * @param req GetClusterStatusRequest
- * @return status object
- * @throws ServiceException
- */
- @Override
- public GetClusterStatusResponse getClusterStatus(RpcController controller, GetClusterStatusRequest req)
- throws ServiceException;
-
- /**
- * @param c Unused (set to null).
- * @param req IsMasterRunningRequest
- * @return IsMasterRunningRequest that contains:
- * isMasterRunning: true if master is available
- * @throws ServiceException
- */
- @Override
- public IsMasterRunningResponse isMasterRunning(RpcController c, IsMasterRunningRequest req)
- throws ServiceException;
}
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/MasterProtocol.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/MasterProtocol.java
deleted file mode 100644
index 62b3b84..0000000
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/MasterProtocol.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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.
- */
-
-// Functions implemented by all the master protocols (e.g. MasterAdminProtocol,
-// MasterMonitorProtocol). Currently, this is only isMasterRunning, which is used,
-// on proxy creation, to check if the master has been stopped. If it has,
-// a MasterNotRunningException is thrown back to the client, and the client retries.
-
-package org.apache.hadoop.hbase;
-
-import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.IsMasterRunningRequest;
-import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.IsMasterRunningResponse;
-import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.MasterService;
-import org.apache.hadoop.hbase.ipc.VersionedProtocol;
-import com.google.protobuf.RpcController;
-import com.google.protobuf.ServiceException;
-
-public interface MasterProtocol extends VersionedProtocol, MasterService.BlockingInterface {
-
- /**
- * @param c Unused (set to null).
- * @param req IsMasterRunningRequest
- * @return IsMasterRunningRequest that contains:
- * isMasterRunning: true if master is available
- * @throws ServiceException
- */
- public IsMasterRunningResponse isMasterRunning(RpcController c, IsMasterRunningRequest req)
- throws ServiceException;
-}
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
index e8942a8..8a2c1e6 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
@@ -62,7 +62,6 @@ import org.apache.hadoop.hbase.KeyValue;
import org.apache.hadoop.hbase.MasterAdminProtocol;
import org.apache.hadoop.hbase.MasterMonitorProtocol;
import org.apache.hadoop.hbase.MasterNotRunningException;
-import org.apache.hadoop.hbase.MasterProtocol;
import org.apache.hadoop.hbase.RegionMovedException;
import org.apache.hadoop.hbase.RemoteExceptionHandler;
import org.apache.hadoop.hbase.ServerName;
@@ -73,12 +72,15 @@ import org.apache.hadoop.hbase.client.MetaScanner.MetaScannerVisitor;
import org.apache.hadoop.hbase.client.MetaScanner.MetaScannerVisitorBase;
import org.apache.hadoop.hbase.client.coprocessor.Batch;
import org.apache.hadoop.hbase.ipc.HBaseClientRPC;
+import org.apache.hadoop.hbase.ipc.ProtobufRpcClientEngine;
import org.apache.hadoop.hbase.ipc.VersionedProtocol;
import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
import org.apache.hadoop.hbase.protobuf.RequestConverter;
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.TableSchema;
import org.apache.hadoop.hbase.protobuf.generated.MasterMonitorProtos.GetTableDescriptorsRequest;
import org.apache.hadoop.hbase.protobuf.generated.MasterMonitorProtos.GetTableDescriptorsResponse;
+import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.MasterService;
+import org.apache.hadoop.hbase.protobuf.generated.MasterProtos;
import org.apache.hadoop.hbase.security.User;
import org.apache.hadoop.hbase.util.Addressing;
import org.apache.hadoop.hbase.util.Bytes;
@@ -94,6 +96,12 @@ import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher;
import org.apache.hadoop.ipc.RemoteException;
import org.apache.zookeeper.KeeperException;
+import com.google.protobuf.Descriptors.MethodDescriptor;
+import com.google.protobuf.BlockingRpcChannel;
+import com.google.protobuf.Message;
+import com.google.protobuf.RpcCallback;
+import com.google.protobuf.RpcChannel;
+import com.google.protobuf.RpcController;
import com.google.protobuf.ServiceException;
/**
@@ -672,14 +680,14 @@ public class HConnectionManager {
}
private static class MasterProtocolState {
- public MasterProtocol protocol;
+ public MasterService.BlockingInterface protocol;
public int userCount;
public long keepAliveUntil = Long.MAX_VALUE;
- public final Class extends MasterProtocol> protocolClass;
+ public final Class extends MasterService.BlockingInterface> protocolClass;
public long version;
public MasterProtocolState (
- final Class extends MasterProtocol> protocolClass, long version) {
+ final Class extends MasterService.BlockingInterface> protocolClass, long version) {
this.protocolClass = protocolClass;
this.version = version;
}
@@ -688,7 +696,7 @@ public class HConnectionManager {
/**
* Create a new Master proxy. Try once only.
*/
- private MasterProtocol createMasterInterface(
+ private MasterService.BlockingInterface createMasterInterface(
MasterProtocolState masterProtocolState)
throws IOException, KeeperException, ServiceException {
@@ -700,29 +708,69 @@ public class HConnectionManager {
}
try {
-
checkIfBaseNodeAvailable(zkw);
- ServerName sn = MasterAddressTracker.getMasterAddress(zkw);
+ final ServerName sn = MasterAddressTracker.getMasterAddress(zkw);
if (sn == null) {
String msg =
"ZooKeeper available but no active master location found";
LOG.info(msg);
throw new MasterNotRunningException(msg);
}
+ final InetSocketAddress isa =
+ new InetSocketAddress(sn.getHostname(), sn.getPort());
+
+ // pb service setup
+ RpcController controller = new RpcController() {
+ @Override
+ public String errorText() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public boolean failed() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean isCanceled() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+ @Override
+ public void notifyOnCancel(RpcCallback