@InterfaceAudience.Private public final class ClusterConnectionFactory extends Object
AsyncClusterConnection
.Modifier and Type | Field and Description |
---|---|
static String |
HBASE_SERVER_CLUSTER_CONNECTION_IMPL |
Modifier | Constructor and Description |
---|---|
private |
ClusterConnectionFactory() |
Modifier and Type | Method and Description |
---|---|
private static AsyncClusterConnection |
createAsyncClusterConnection(org.apache.hadoop.conf.Configuration conf,
ConnectionRegistry registry,
SocketAddress localAddress,
User user) |
static AsyncClusterConnection |
createAsyncClusterConnection(org.apache.hadoop.conf.Configuration conf,
SocketAddress localAddress,
User user)
Create a new
AsyncClusterConnection instance. |
static AsyncClusterConnection |
createAsyncClusterConnection(ConnectionRegistryEndpoint endpoint,
org.apache.hadoop.conf.Configuration conf,
SocketAddress localAddress,
User user)
Create a new
AsyncClusterConnection instance to be used at server side where we have a
ConnectionRegistryEndpoint . |
public static final String HBASE_SERVER_CLUSTER_CONNECTION_IMPL
private ClusterConnectionFactory()
private static AsyncClusterConnection createAsyncClusterConnection(org.apache.hadoop.conf.Configuration conf, ConnectionRegistry registry, SocketAddress localAddress, User user) throws IOException
IOException
public static AsyncClusterConnection createAsyncClusterConnection(org.apache.hadoop.conf.Configuration conf, SocketAddress localAddress, User user) throws IOException
AsyncClusterConnection
instance.
Unlike what we have done in ConnectionFactory
, here we just return an
AsyncClusterConnection
instead of a 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 CompletableFuture
here.IOException
public static AsyncClusterConnection createAsyncClusterConnection(ConnectionRegistryEndpoint endpoint, org.apache.hadoop.conf.Configuration conf, SocketAddress localAddress, User user) throws IOException
AsyncClusterConnection
instance to be used at server side where we have a
ConnectionRegistryEndpoint
.IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.