From commits-return-83646-archive-asf-public=cust-asf.ponee.io@hbase.apache.org Sun Mar 3 11:16:55 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id D423718067E for ; Sun, 3 Mar 2019 12:16:53 +0100 (CET) Received: (qmail 83698 invoked by uid 500); 3 Mar 2019 11:16:52 -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 83461 invoked by uid 99); 3 Mar 2019 11:16:52 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Mar 2019 11:16:52 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 04BF287754; Sun, 3 Mar 2019 11:16:52 +0000 (UTC) Date: Sun, 03 Mar 2019 11:16:52 +0000 To: "commits@hbase.apache.org" Subject: [hbase] 01/11: HBASE-21515 Also initialize an AsyncClusterConnection in HRegionServer MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: zhangduo@apache.org In-Reply-To: <155161181183.5432.1456190587927363803@gitbox.apache.org> References: <155161181183.5432.1456190587927363803@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: hbase X-Git-Refname: refs/heads/HBASE-21512 X-Git-Reftype: branch X-Git-Rev: e143f20659506635ea4f2d9d52308982308de6af X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20190303111652.04BF287754@gitbox.apache.org> This is an automated email from the ASF dual-hosted git repository. zhangduo pushed a commit to branch HBASE-21512 in repository https://gitbox.apache.org/repos/asf/hbase.git commit e143f20659506635ea4f2d9d52308982308de6af Author: zhangduo AuthorDate: Fri Nov 30 08:23:47 2018 +0800 HBASE-21515 Also initialize an AsyncClusterConnection in HRegionServer --- .../hbase/client/AsyncClusterConnection.java | 38 +++++++++++++ .../hadoop/hbase/client/AsyncConnectionImpl.java | 14 +++-- .../hbase/client/ClusterConnectionFactory.java | 63 ++++++++++++++++++++++ .../hadoop/hbase/client/ConnectionFactory.java | 2 +- .../hbase/client/TestAsyncAdminRpcPriority.java | 2 +- .../hbase/client/TestAsyncTableRpcPriority.java | 2 +- .../apache/hadoop/hbase/util/ReflectionUtils.java | 22 ++++---- .../main/java/org/apache/hadoop/hbase/Server.java | 20 +++++++ .../org/apache/hadoop/hbase/master/HMaster.java | 3 ++ .../hadoop/hbase/regionserver/HRegionServer.java | 56 +++++++++++++------ .../regionserver/ReplicationSyncUp.java | 6 +++ .../hadoop/hbase/MockRegionServerServices.java | 5 ++ .../client/TestAsyncNonMetaRegionLocator.java | 2 +- ...stAsyncNonMetaRegionLocatorConcurrenyLimit.java | 2 +- .../hbase/client/TestAsyncRegionLocator.java | 2 +- .../TestAsyncSingleRequestRpcRetryingCaller.java | 4 +- .../hbase/master/MockNoopMasterServices.java | 6 +++ .../hadoop/hbase/master/MockRegionServer.java | 5 ++ .../hbase/master/TestActiveMasterManager.java | 6 +++ .../hbase/master/cleaner/TestHFileCleaner.java | 6 +++ .../hbase/master/cleaner/TestHFileLinkCleaner.java | 6 +++ .../hbase/master/cleaner/TestLogsCleaner.java | 6 +++ .../cleaner/TestReplicationHFileCleaner.java | 6 +++ .../hbase/regionserver/TestHeapMemoryManager.java | 6 +++ .../hbase/regionserver/TestSplitLogWorker.java | 6 +++ .../hadoop/hbase/regionserver/TestWALLockup.java | 6 +++ .../replication/TestReplicationTrackerZKImpl.java | 6 +++ .../regionserver/TestReplicationSourceManager.java | 6 +++ .../security/token/TestTokenAuthentication.java | 6 +++ .../org/apache/hadoop/hbase/util/MockServer.java | 6 +++ 30 files changed, 290 insertions(+), 36 deletions(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncClusterConnection.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncClusterConnection.java new file mode 100644 index 0000000..c7dea25 --- /dev/null +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncClusterConnection.java @@ -0,0 +1,38 @@ +/** + * 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. + */ +package org.apache.hadoop.hbase.client; + +import org.apache.hadoop.hbase.ipc.RpcClient; +import org.apache.yetus.audience.InterfaceAudience; + +/** + * The asynchronous connection for internal usage. + */ +@InterfaceAudience.Private +public interface AsyncClusterConnection extends AsyncConnection { + + /** + * Get the nonce generator for this connection. + */ + NonceGenerator getNonceGenerator(); + + /** + * Get the rpc client we used to communicate with other servers. + */ + RpcClient getRpcClient(); +} diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncConnectionImpl.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncConnectionImpl.java index e47d4cc..f8ad97a 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncConnectionImpl.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncConnectionImpl.java @@ -23,6 +23,7 @@ import static org.apache.hadoop.hbase.client.NonceGenerator.CLIENT_NONCES_ENABLE import static org.apache.hadoop.hbase.util.FutureUtils.addListener; import java.io.IOException; +import java.net.SocketAddress; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; @@ -63,7 +64,7 @@ import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.MasterServ * The implementation of AsyncConnection. */ @InterfaceAudience.Private -class AsyncConnectionImpl implements AsyncConnection { +class AsyncConnectionImpl implements AsyncClusterConnection { private static final Logger LOG = LoggerFactory.getLogger(AsyncConnectionImpl.class); @@ -108,7 +109,7 @@ class AsyncConnectionImpl implements AsyncConnection { private volatile boolean closed = false; public AsyncConnectionImpl(Configuration conf, AsyncRegistry registry, String clusterId, - User user) { + SocketAddress localAddress, User user) { this.conf = conf; this.user = user; if (user.isLoginFromKeytab()) { @@ -116,7 +117,7 @@ class AsyncConnectionImpl implements AsyncConnection { } this.connConf = new AsyncConnectionConfiguration(conf); this.registry = registry; - this.rpcClient = RpcClientFactory.createClient(conf, clusterId); + this.rpcClient = RpcClientFactory.createClient(conf, clusterId, localAddress, null); this.rpcControllerFactory = RpcControllerFactory.instantiate(conf); this.hostnameCanChange = conf.getBoolean(RESOLVE_HOSTNAME_ON_FAIL_KEY, true); this.rpcTimeout = @@ -171,11 +172,16 @@ class AsyncConnectionImpl implements AsyncConnection { } // ditto - @VisibleForTesting + @Override public NonceGenerator getNonceGenerator() { return nonceGenerator; } + @Override + public RpcClient getRpcClient() { + return rpcClient; + } + private ClientService.Interface createRegionServerStub(ServerName serverName) throws IOException { return ClientService.newStub(rpcClient.createRpcChannel(serverName, user, rpcTimeout)); } diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnectionFactory.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnectionFactory.java new file mode 100644 index 0000000..68c0630 --- /dev/null +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClusterConnectionFactory.java @@ -0,0 +1,63 @@ +/** + * 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. + */ +package org.apache.hadoop.hbase.client; + +import java.io.IOException; +import java.io.InterruptedIOException; +import java.net.SocketAddress; +import java.util.concurrent.ExecutionException; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hbase.security.User; +import org.apache.yetus.audience.InterfaceAudience; + +import org.apache.hbase.thirdparty.com.google.common.base.Throwables; + +/** + * The factory for creating {@link AsyncClusterConnection}. + */ +@InterfaceAudience.Private +public final class ClusterConnectionFactory { + + private ClusterConnectionFactory() { + } + + /** + * Create a new {@link AsyncClusterConnection} instance. + *

+ * Unlike what we have done in {@link ConnectionFactory}, here we just return an + * {@link AsyncClusterConnection} instead of a {@link java.util.concurrent.CompletableFuture}, + * which means this method could block on fetching the cluster id. This is just used to simplify + * the implementation, as when starting new region servers, we do not need to be event-driven. Can + * change later if we want a {@link java.util.concurrent.CompletableFuture} here. + */ + public static AsyncClusterConnection createAsyncClusterConnection(Configuration conf, + SocketAddress localAddress, User user) throws IOException { + AsyncRegistry registry = AsyncRegistryFactory.getRegistry(conf); + String clusterId; + try { + clusterId = registry.getClusterId().get(); + } catch (InterruptedException e) { + throw (IOException) new InterruptedIOException().initCause(e); + } catch (ExecutionException e) { + Throwable cause = e.getCause(); + Throwables.propagateIfPossible(cause, IOException.class); + throw new IOException(cause); + } + return new AsyncConnectionImpl(conf, registry, clusterId, localAddress, user); + } +} diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionFactory.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionFactory.java index b36485f..b984a99 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionFactory.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionFactory.java @@ -298,7 +298,7 @@ public class ConnectionFactory { try { future.complete( user.runAs((PrivilegedExceptionAction) () -> ReflectionUtils - .newInstance(clazz, conf, registry, clusterId, user))); + .newInstance(clazz, conf, registry, clusterId, null, user))); } catch (Exception e) { registry.close(); future.completeExceptionally(e); diff --git a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncAdminRpcPriority.java b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncAdminRpcPriority.java index 46d786e..d4db7a4 100644 --- a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncAdminRpcPriority.java +++ b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncAdminRpcPriority.java @@ -142,7 +142,7 @@ public class TestAsyncAdminRpcPriority { }).when(adminStub).stopServer(any(HBaseRpcController.class), any(StopServerRequest.class), any()); - conn = new AsyncConnectionImpl(CONF, new DoNothingAsyncRegistry(CONF), "test", + conn = new AsyncConnectionImpl(CONF, new DoNothingAsyncRegistry(CONF), "test", null, UserProvider.instantiate(CONF).getCurrent()) { @Override diff --git a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableRpcPriority.java b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableRpcPriority.java index 56dcf10..15429cb 100644 --- a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableRpcPriority.java +++ b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableRpcPriority.java @@ -175,7 +175,7 @@ public class TestAsyncTableRpcPriority { return null; } }).when(stub).get(any(HBaseRpcController.class), any(GetRequest.class), any()); - conn = new AsyncConnectionImpl(CONF, new DoNothingAsyncRegistry(CONF), "test", + conn = new AsyncConnectionImpl(CONF, new DoNothingAsyncRegistry(CONF), "test", null, UserProvider.instantiate(CONF).getCurrent()) { @Override diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ReflectionUtils.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ReflectionUtils.java index a136846..268249d 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ReflectionUtils.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ReflectionUtils.java @@ -83,15 +83,19 @@ public class ReflectionUtils { boolean match = true; for (int i = 0; i < ctorParamTypes.length && match; ++i) { - Class paramType = paramTypes[i].getClass(); - match = (!ctorParamTypes[i].isPrimitive()) ? ctorParamTypes[i].isAssignableFrom(paramType) : - ((int.class.equals(ctorParamTypes[i]) && Integer.class.equals(paramType)) || - (long.class.equals(ctorParamTypes[i]) && Long.class.equals(paramType)) || - (double.class.equals(ctorParamTypes[i]) && Double.class.equals(paramType)) || - (char.class.equals(ctorParamTypes[i]) && Character.class.equals(paramType)) || - (short.class.equals(ctorParamTypes[i]) && Short.class.equals(paramType)) || - (boolean.class.equals(ctorParamTypes[i]) && Boolean.class.equals(paramType)) || - (byte.class.equals(ctorParamTypes[i]) && Byte.class.equals(paramType))); + if (paramTypes[i] == null) { + match = !ctorParamTypes[i].isPrimitive(); + } else { + Class paramType = paramTypes[i].getClass(); + match = (!ctorParamTypes[i].isPrimitive()) ? ctorParamTypes[i].isAssignableFrom(paramType) + : ((int.class.equals(ctorParamTypes[i]) && Integer.class.equals(paramType)) || + (long.class.equals(ctorParamTypes[i]) && Long.class.equals(paramType)) || + (double.class.equals(ctorParamTypes[i]) && Double.class.equals(paramType)) || + (char.class.equals(ctorParamTypes[i]) && Character.class.equals(paramType)) || + (short.class.equals(ctorParamTypes[i]) && Short.class.equals(paramType)) || + (boolean.class.equals(ctorParamTypes[i]) && Boolean.class.equals(paramType)) || + (byte.class.equals(ctorParamTypes[i]) && Byte.class.equals(paramType))); + } } if (match) { diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/Server.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/Server.java index fb898ea..c33d5af 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/Server.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/Server.java @@ -20,6 +20,8 @@ package org.apache.hadoop.hbase; import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.hbase.client.AsyncClusterConnection; +import org.apache.hadoop.hbase.client.AsyncConnection; import org.apache.hadoop.hbase.client.ClusterConnection; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.zookeeper.ZKWatcher; @@ -61,6 +63,24 @@ public interface Server extends Abortable, Stoppable { ClusterConnection getClusterConnection(); /** + * Returns a reference to the servers' async connection. + *

+ * Important note: this method returns a reference to Connection which is managed by Server + * itself, so callers must NOT attempt to close connection obtained. + */ + default AsyncConnection getAsyncConnection() { + return getAsyncClusterConnection(); + } + + /** + * Returns a reference to the servers' async cluster connection. + *

+ * Important note: this method returns a reference to Connection which is managed by Server + * itself, so callers must NOT attempt to close connection obtained. + */ + AsyncClusterConnection getAsyncClusterConnection(); + + /** * @return The unique server name for this server. */ ServerName getServerName(); diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java index 10bfade..8aa63fe 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java @@ -3039,6 +3039,9 @@ public class HMaster extends HRegionServer implements MasterServices { if (this.clusterConnection != null) { this.clusterConnection.close(); } + if (this.asyncClusterConnection != null) { + this.asyncClusterConnection.close(); + } } public void stopMaster() throws IOException { diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java index f983882..ba25e81 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java @@ -82,7 +82,9 @@ import org.apache.hadoop.hbase.TableDescriptors; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.YouAreDeadException; import org.apache.hadoop.hbase.ZNodeClearer; +import org.apache.hadoop.hbase.client.AsyncClusterConnection; import org.apache.hadoop.hbase.client.ClusterConnection; +import org.apache.hadoop.hbase.client.ClusterConnectionFactory; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.client.ConnectionUtils; import org.apache.hadoop.hbase.client.RegionInfo; @@ -109,7 +111,6 @@ import org.apache.hadoop.hbase.io.util.MemorySizeUtil; import org.apache.hadoop.hbase.ipc.CoprocessorRpcUtils; import org.apache.hadoop.hbase.ipc.NettyRpcClientConfigHelper; import org.apache.hadoop.hbase.ipc.RpcClient; -import org.apache.hadoop.hbase.ipc.RpcClientFactory; import org.apache.hadoop.hbase.ipc.RpcControllerFactory; import org.apache.hadoop.hbase.ipc.RpcServer; import org.apache.hadoop.hbase.ipc.RpcServerInterface; @@ -268,6 +269,11 @@ public class HRegionServer extends HasThread implements protected ClusterConnection clusterConnection; /** + * The asynchronous cluster connection to be shared by services. + */ + protected AsyncClusterConnection asyncClusterConnection; + + /** * Go here to get table descriptors. */ protected TableDescriptors tableDescriptors; @@ -784,11 +790,7 @@ public class HRegionServer extends HasThread implements return true; } - /** - * Create a 'smarter' Connection, one that is capable of by-passing RPC if the request is to the - * local server; i.e. a short-circuit Connection. Safe to use going to local or remote server. - */ - private ClusterConnection createClusterConnection() throws IOException { + private Configuration unsetClientZookeeperQuorum() { Configuration conf = this.conf; if (conf.get(HConstants.CLIENT_ZOOKEEPER_QUORUM) != null) { // Use server ZK cluster for server-issued connections, so we clone @@ -796,11 +798,20 @@ public class HRegionServer extends HasThread implements conf = new Configuration(this.conf); conf.unset(HConstants.CLIENT_ZOOKEEPER_QUORUM); } + return conf; + } + + /** + * Create a 'smarter' Connection, one that is capable of by-passing RPC if the request is to the + * local server; i.e. a short-circuit Connection. Safe to use going to local or remote server. + */ + private ClusterConnection createClusterConnection() throws IOException { // Create a cluster connection that when appropriate, can short-circuit and go directly to the // local server if the request is to the local server bypassing RPC. Can be used for both local // and remote invocations. - ClusterConnection conn = ConnectionUtils.createShortCircuitConnection(conf, null, - userProvider.getCurrent(), serverName, rpcServices, rpcServices); + ClusterConnection conn = + ConnectionUtils.createShortCircuitConnection(unsetClientZookeeperQuorum(), null, + userProvider.getCurrent(), serverName, rpcServices, rpcServices); // This is used to initialize the batch thread pool inside the connection implementation. // When deploy a fresh cluster, we may first use the cluster connection in InitMetaProcedure, // which will be executed inside the PEWorker, and then the batch thread pool will inherit the @@ -834,9 +845,12 @@ public class HRegionServer extends HasThread implements /** * Setup our cluster connection if not already initialized. */ - protected synchronized void setupClusterConnection() throws IOException { + protected final synchronized void setupClusterConnection() throws IOException { if (clusterConnection == null) { clusterConnection = createClusterConnection(); + asyncClusterConnection = + ClusterConnectionFactory.createAsyncClusterConnection(unsetClientZookeeperQuorum(), + new InetSocketAddress(this.rpcServices.isa.getAddress(), 0), userProvider.getCurrent()); } } @@ -850,8 +864,7 @@ public class HRegionServer extends HasThread implements initializeZooKeeper(); setupClusterConnection(); // Setup RPC client for master communication - this.rpcClient = RpcClientFactory.createClient(conf, clusterId, new InetSocketAddress( - this.rpcServices.isa.getAddress(), 0), clusterConnection.getConnectionMetrics()); + this.rpcClient = asyncClusterConnection.getRpcClient(); } catch (Throwable t) { // Call stop if error or process will stick around for ever since server // puts up non-daemon threads. @@ -1115,7 +1128,15 @@ public class HRegionServer extends HasThread implements LOG.warn("Attempt to close server's short circuit ClusterConnection failed.", e); } } - + if (this.asyncClusterConnection != null) { + try { + this.asyncClusterConnection.close(); + } catch (IOException e) { + // Although the {@link Closeable} interface throws an {@link + // IOException}, in reality, the implementation would never do that. + LOG.warn("Attempt to close server's AsyncClusterConnection failed.", e); + } + } // Closing the compactSplit thread before closing meta regions if (!this.killed && containsMetaTableRegions()) { if (!abortRequested || this.fsOk) { @@ -3754,9 +3775,9 @@ public class HRegionServer extends HasThread implements } @Override - public EntityLock regionLock(List regionInfos, String description, - Abortable abort) throws IOException { - return new LockServiceClient(conf, lockStub, clusterConnection.getNonceGenerator()) + public EntityLock regionLock(List regionInfos, String description, Abortable abort) + throws IOException { + return new LockServiceClient(conf, lockStub, asyncClusterConnection.getNonceGenerator()) .regionLock(regionInfos, description, abort); } @@ -3863,4 +3884,9 @@ public class HRegionServer extends HasThread implements Runtime.getRuntime().halt(1); } } + + @Override + public AsyncClusterConnection getAsyncClusterConnection() { + return asyncClusterConnection; + } } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSyncUp.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSyncUp.java index c7bccb3..7d1245c 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSyncUp.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSyncUp.java @@ -29,6 +29,7 @@ import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.Server; import org.apache.hadoop.hbase.ServerName; +import org.apache.hadoop.hbase.client.AsyncClusterConnection; import org.apache.hadoop.hbase.client.ClusterConnection; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.util.FSUtils; @@ -180,5 +181,10 @@ public class ReplicationSyncUp extends Configured implements Tool { public Connection createConnection(Configuration conf) throws IOException { return null; } + + @Override + public AsyncClusterConnection getAsyncClusterConnection() { + return null; + } } } diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/MockRegionServerServices.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/MockRegionServerServices.java index 0e4f241..5205960 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/MockRegionServerServices.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/MockRegionServerServices.java @@ -31,6 +31,7 @@ import java.util.concurrent.ConcurrentSkipListMap; import java.util.concurrent.atomic.AtomicBoolean; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.hbase.client.AsyncClusterConnection; import org.apache.hadoop.hbase.client.ClusterConnection; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.client.RegionInfo; @@ -368,4 +369,8 @@ public class MockRegionServerServices implements RegionServerServices { public Optional getMobFileCache() { return Optional.empty(); } + + public AsyncClusterConnection getAsyncClusterConnection() { + return null; + } } diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncNonMetaRegionLocator.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncNonMetaRegionLocator.java index cb09b79..6cdb9de 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncNonMetaRegionLocator.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncNonMetaRegionLocator.java @@ -81,7 +81,7 @@ public class TestAsyncNonMetaRegionLocator { TEST_UTIL.getAdmin().balancerSwitch(false, true); AsyncRegistry registry = AsyncRegistryFactory.getRegistry(TEST_UTIL.getConfiguration()); CONN = new AsyncConnectionImpl(TEST_UTIL.getConfiguration(), registry, - registry.getClusterId().get(), User.getCurrent()); + registry.getClusterId().get(), null, User.getCurrent()); LOCATOR = new AsyncNonMetaRegionLocator(CONN); SPLIT_KEYS = new byte[8][]; for (int i = 111; i < 999; i += 111) { diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncNonMetaRegionLocatorConcurrenyLimit.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncNonMetaRegionLocatorConcurrenyLimit.java index 8cdb4a9..7e06218 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncNonMetaRegionLocatorConcurrenyLimit.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncNonMetaRegionLocatorConcurrenyLimit.java @@ -125,7 +125,7 @@ public class TestAsyncNonMetaRegionLocatorConcurrenyLimit { TEST_UTIL.getAdmin().balancerSwitch(false, true); AsyncRegistry registry = AsyncRegistryFactory.getRegistry(TEST_UTIL.getConfiguration()); CONN = new AsyncConnectionImpl(TEST_UTIL.getConfiguration(), registry, - registry.getClusterId().get(), User.getCurrent()); + registry.getClusterId().get(), null, User.getCurrent()); LOCATOR = new AsyncNonMetaRegionLocator(CONN); SPLIT_KEYS = IntStream.range(1, 256).mapToObj(i -> Bytes.toBytes(String.format("%02x", i))) .toArray(byte[][]::new); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncRegionLocator.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncRegionLocator.java index 0a94def..a7cf322 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncRegionLocator.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncRegionLocator.java @@ -100,7 +100,7 @@ public class TestAsyncRegionLocator { TEST_UTIL.waitTableAvailable(TABLE_NAME); AsyncRegistry registry = AsyncRegistryFactory.getRegistry(TEST_UTIL.getConfiguration()); CONN = new AsyncConnectionImpl(TEST_UTIL.getConfiguration(), registry, - registry.getClusterId().get(), User.getCurrent()); + registry.getClusterId().get(), null, User.getCurrent()); LOCATOR = CONN.getLocator(); } diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncSingleRequestRpcRetryingCaller.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncSingleRequestRpcRetryingCaller.java index 7d8956b..29dcd56 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncSingleRequestRpcRetryingCaller.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncSingleRequestRpcRetryingCaller.java @@ -73,7 +73,7 @@ public class TestAsyncSingleRequestRpcRetryingCaller { TEST_UTIL.waitTableAvailable(TABLE_NAME); AsyncRegistry registry = AsyncRegistryFactory.getRegistry(TEST_UTIL.getConfiguration()); CONN = new AsyncConnectionImpl(TEST_UTIL.getConfiguration(), registry, - registry.getClusterId().get(), User.getCurrent()); + registry.getClusterId().get(), null, User.getCurrent()); } @AfterClass @@ -164,7 +164,7 @@ public class TestAsyncSingleRequestRpcRetryingCaller { } }; try (AsyncConnectionImpl mockedConn = new AsyncConnectionImpl(CONN.getConfiguration(), - CONN.registry, CONN.registry.getClusterId().get(), User.getCurrent()) { + CONN.registry, CONN.registry.getClusterId().get(), null, User.getCurrent()) { @Override AsyncRegionLocator getLocator() { diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/MockNoopMasterServices.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/MockNoopMasterServices.java index 9c55f57..3ebad66 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/MockNoopMasterServices.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/MockNoopMasterServices.java @@ -29,6 +29,7 @@ import org.apache.hadoop.hbase.CoordinatedStateManager; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.TableDescriptors; import org.apache.hadoop.hbase.TableName; +import org.apache.hadoop.hbase.client.AsyncClusterConnection; import org.apache.hadoop.hbase.client.ClusterConnection; import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor; import org.apache.hadoop.hbase.client.Connection; @@ -473,4 +474,9 @@ public class MockNoopMasterServices implements MasterServices { public SyncReplicationReplayWALManager getSyncReplicationReplayWALManager() { return null; } + + @Override + public AsyncClusterConnection getAsyncClusterConnection() { + return null; + } } \ No newline at end of file diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/MockRegionServer.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/MockRegionServer.java index a930d7f..73d53c7 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/MockRegionServer.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/MockRegionServer.java @@ -41,6 +41,7 @@ import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.TableDescriptors; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.ZooKeeperConnectionException; +import org.apache.hadoop.hbase.client.AsyncClusterConnection; import org.apache.hadoop.hbase.client.ClusterConnection; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.client.RegionInfo; @@ -721,4 +722,8 @@ class MockRegionServer implements AdminProtos.AdminService.BlockingInterface, public Optional getMobFileCache() { return Optional.empty(); } + + public AsyncClusterConnection getAsyncClusterConnection() { + return null; + } } diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestActiveMasterManager.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestActiveMasterManager.java index 2300f54..77667a7 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestActiveMasterManager.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestActiveMasterManager.java @@ -31,6 +31,7 @@ import org.apache.hadoop.hbase.HBaseClassTestRule; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.Server; import org.apache.hadoop.hbase.ServerName; +import org.apache.hadoop.hbase.client.AsyncClusterConnection; import org.apache.hadoop.hbase.client.ClusterConnection; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.monitoring.MonitoredTask; @@ -349,5 +350,10 @@ public class TestActiveMasterManager { public Connection createConnection(Configuration conf) throws IOException { return null; } + + @Override + public AsyncClusterConnection getAsyncClusterConnection() { + return null; + } } } diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestHFileCleaner.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestHFileCleaner.java index 5c8db3e..c5fad32 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestHFileCleaner.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestHFileCleaner.java @@ -36,6 +36,7 @@ import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.Server; import org.apache.hadoop.hbase.ServerName; +import org.apache.hadoop.hbase.client.AsyncClusterConnection; import org.apache.hadoop.hbase.client.ClusterConnection; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.testclassification.MasterTests; @@ -279,6 +280,11 @@ public class TestHFileCleaner { public Connection createConnection(Configuration conf) throws IOException { return null; } + + @Override + public AsyncClusterConnection getAsyncClusterConnection() { + return null; + } } @Test diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestHFileLinkCleaner.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestHFileLinkCleaner.java index 119194b..fd11ff8 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestHFileLinkCleaner.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestHFileLinkCleaner.java @@ -34,6 +34,7 @@ import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.Server; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.TableName; +import org.apache.hadoop.hbase.client.AsyncClusterConnection; import org.apache.hadoop.hbase.client.ClusterConnection; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.io.HFileLink; @@ -213,5 +214,10 @@ public class TestHFileLinkCleaner { public Connection createConnection(Configuration conf) throws IOException { return null; } + + @Override + public AsyncClusterConnection getAsyncClusterConnection() { + return null; + } } } diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestLogsCleaner.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestLogsCleaner.java index 4d254a0..6a5fe9c 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestLogsCleaner.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestLogsCleaner.java @@ -50,6 +50,7 @@ import org.apache.hadoop.hbase.Server; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.Waiter; import org.apache.hadoop.hbase.ZooKeeperConnectionException; +import org.apache.hadoop.hbase.client.AsyncClusterConnection; import org.apache.hadoop.hbase.client.ClusterConnection; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.master.HMaster; @@ -411,6 +412,11 @@ public class TestLogsCleaner { public Connection createConnection(Configuration conf) throws IOException { return null; } + + @Override + public AsyncClusterConnection getAsyncClusterConnection() { + return null; + } } static class FaultyZooKeeperWatcher extends ZKWatcher { diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestReplicationHFileCleaner.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestReplicationHFileCleaner.java index d162bf3..9791643 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestReplicationHFileCleaner.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestReplicationHFileCleaner.java @@ -41,6 +41,7 @@ import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.Server; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.ZooKeeperConnectionException; +import org.apache.hadoop.hbase.client.AsyncClusterConnection; import org.apache.hadoop.hbase.client.ClusterConnection; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.master.HMaster; @@ -303,6 +304,11 @@ public class TestReplicationHFileCleaner { public Connection createConnection(Configuration conf) throws IOException { return null; } + + @Override + public AsyncClusterConnection getAsyncClusterConnection() { + return null; + } } static class FaultyZooKeeperWatcher extends ZKWatcher { diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHeapMemoryManager.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHeapMemoryManager.java index 8c9ce75..4a359e4 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHeapMemoryManager.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHeapMemoryManager.java @@ -36,6 +36,7 @@ import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.Server; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.Waiter; +import org.apache.hadoop.hbase.client.AsyncClusterConnection; import org.apache.hadoop.hbase.client.ClusterConnection; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.io.hfile.BlockCache; @@ -862,6 +863,11 @@ public class TestHeapMemoryManager { public Connection createConnection(Configuration conf) throws IOException { return null; } + + @Override + public AsyncClusterConnection getAsyncClusterConnection() { + return null; + } } static class CustomHeapMemoryTuner implements HeapMemoryTuner { diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitLogWorker.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitLogWorker.java index 14dc619..43da846 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitLogWorker.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitLogWorker.java @@ -42,6 +42,7 @@ import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.SplitLogCounters; import org.apache.hadoop.hbase.SplitLogTask; import org.apache.hadoop.hbase.Waiter; +import org.apache.hadoop.hbase.client.AsyncClusterConnection; import org.apache.hadoop.hbase.client.ClusterConnection; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.coordination.ZkCoordinatedStateManager; @@ -160,6 +161,11 @@ public class TestSplitLogWorker { public Connection createConnection(Configuration conf) throws IOException { return null; } + + @Override + public AsyncClusterConnection getAsyncClusterConnection() { + return null; + } } private void waitForCounter(LongAdder ctr, long oldval, long newval, long timems) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestWALLockup.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestWALLockup.java index 0e20252..9e9d1d6 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestWALLockup.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestWALLockup.java @@ -36,6 +36,7 @@ import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.Server; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.TableName; +import org.apache.hadoop.hbase.client.AsyncClusterConnection; import org.apache.hadoop.hbase.client.ClusterConnection; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.client.Durability; @@ -523,6 +524,11 @@ public class TestWALLockup { public Connection createConnection(Configuration conf) throws IOException { return null; } + + @Override + public AsyncClusterConnection getAsyncClusterConnection() { + return null; + } } static class DummyWALActionsListener implements WALActionsListener { diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationTrackerZKImpl.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationTrackerZKImpl.java index 863d558..62ab265 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationTrackerZKImpl.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationTrackerZKImpl.java @@ -32,6 +32,7 @@ import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.Server; import org.apache.hadoop.hbase.ServerName; +import org.apache.hadoop.hbase.client.AsyncClusterConnection; import org.apache.hadoop.hbase.client.ClusterConnection; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.testclassification.MediumTests; @@ -263,5 +264,10 @@ public class TestReplicationTrackerZKImpl { public Connection createConnection(Configuration conf) throws IOException { return null; } + + @Override + public AsyncClusterConnection getAsyncClusterConnection() { + return null; + } } } diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestReplicationSourceManager.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestReplicationSourceManager.java index 86bbb09..427f319 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestReplicationSourceManager.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestReplicationSourceManager.java @@ -57,6 +57,7 @@ import org.apache.hadoop.hbase.Server; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.Waiter; +import org.apache.hadoop.hbase.client.AsyncClusterConnection; import org.apache.hadoop.hbase.client.ClusterConnection; import org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder; import org.apache.hadoop.hbase.client.Connection; @@ -906,5 +907,10 @@ public abstract class TestReplicationSourceManager { public Connection createConnection(Configuration conf) throws IOException { return null; } + + @Override + public AsyncClusterConnection getAsyncClusterConnection() { + return null; + } } } diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java index e4780f1..92c8e54 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java @@ -44,6 +44,7 @@ import org.apache.hadoop.hbase.HBaseClassTestRule; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.Server; import org.apache.hadoop.hbase.ServerName; +import org.apache.hadoop.hbase.client.AsyncClusterConnection; import org.apache.hadoop.hbase.client.ClusterConnection; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.client.ConnectionFactory; @@ -363,6 +364,11 @@ public class TestTokenAuthentication { public Connection createConnection(Configuration conf) throws IOException { return null; } + + @Override + public AsyncClusterConnection getAsyncClusterConnection() { + return null; + } } @Parameters(name = "{index}: rpcServerImpl={0}") diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MockServer.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MockServer.java index c25db01..13212d2 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MockServer.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MockServer.java @@ -26,6 +26,7 @@ import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.Server; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.ZooKeeperConnectionException; +import org.apache.hadoop.hbase.client.AsyncClusterConnection; import org.apache.hadoop.hbase.client.ClusterConnection; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.log.HBaseMarkers; @@ -143,4 +144,9 @@ public class MockServer implements Server { public Connection createConnection(Configuration conf) throws IOException { return null; } + + @Override + public AsyncClusterConnection getAsyncClusterConnection() { + return null; + } }