Package org.apache.hadoop.hbase.client
Class ClusterConnectionFactory
java.lang.Object
org.apache.hadoop.hbase.client.ClusterConnectionFactory
The factory for creating
AsyncClusterConnection
.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic AsyncClusterConnection
createAsyncClusterConnection
(URI uri, org.apache.hadoop.conf.Configuration conf, SocketAddress localAddress, User user) Create a newAsyncClusterConnection
instance.static AsyncClusterConnection
createAsyncClusterConnection
(org.apache.hadoop.conf.Configuration conf, SocketAddress localAddress, User user) Create a newAsyncClusterConnection
instance.private static AsyncClusterConnection
createAsyncClusterConnection
(org.apache.hadoop.conf.Configuration conf, ConnectionRegistry registry, SocketAddress localAddress, User user) static AsyncClusterConnection
createAsyncClusterConnection
(ConnectionRegistryEndpoint endpoint, org.apache.hadoop.conf.Configuration conf, SocketAddress localAddress, User user) Create a newAsyncClusterConnection
instance to be used at server side where we have aConnectionRegistryEndpoint
.
-
Field Details
-
HBASE_SERVER_CLUSTER_CONNECTION_IMPL
- See Also:
-
-
Constructor Details
-
ClusterConnectionFactory
private ClusterConnectionFactory()
-
-
Method Details
-
createAsyncClusterConnection
private static AsyncClusterConnection createAsyncClusterConnection(org.apache.hadoop.conf.Configuration conf, ConnectionRegistry registry, SocketAddress localAddress, User user) throws IOException - Throws:
IOException
-
createAsyncClusterConnection
public static AsyncClusterConnection createAsyncClusterConnection(org.apache.hadoop.conf.Configuration conf, SocketAddress localAddress, User user) throws IOException Create a newAsyncClusterConnection
instance. Unlike what we have done inConnectionFactory
, here we just return anAsyncClusterConnection
instead of aCompletableFuture
, 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 aCompletableFuture
here.- Throws:
IOException
-
createAsyncClusterConnection
public static AsyncClusterConnection createAsyncClusterConnection(URI uri, org.apache.hadoop.conf.Configuration conf, SocketAddress localAddress, User user) throws IOException Create a newAsyncClusterConnection
instance. This is usually used in replication, the givenuri
specifies the connection info of the remote cluster.- Throws:
IOException
-
createAsyncClusterConnection
public static AsyncClusterConnection createAsyncClusterConnection(ConnectionRegistryEndpoint endpoint, org.apache.hadoop.conf.Configuration conf, SocketAddress localAddress, User user) throws IOException Create a newAsyncClusterConnection
instance to be used at server side where we have aConnectionRegistryEndpoint
.- Throws:
IOException
-