Package org.apache.hadoop.hbase.client
Class ClusterConnectionFactory
java.lang.Object
org.apache.hadoop.hbase.client.ClusterConnectionFactory
The factory for creating
AsyncClusterConnection.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AsyncClusterConnectioncreateAsyncClusterConnection(URI uri, org.apache.hadoop.conf.Configuration conf, SocketAddress localAddress, User user) Create a newAsyncClusterConnectioninstance.static AsyncClusterConnectioncreateAsyncClusterConnection(org.apache.hadoop.conf.Configuration conf, SocketAddress localAddress, User user) Create a newAsyncClusterConnectioninstance.private static AsyncClusterConnectioncreateAsyncClusterConnection(org.apache.hadoop.conf.Configuration conf, ConnectionRegistry registry, SocketAddress localAddress, User user) static AsyncClusterConnectioncreateAsyncClusterConnection(ConnectionRegistryEndpoint endpoint, org.apache.hadoop.conf.Configuration conf, SocketAddress localAddress, User user) Create a newAsyncClusterConnectioninstance 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 newAsyncClusterConnectioninstance. Unlike what we have done inConnectionFactory, here we just return anAsyncClusterConnectioninstead 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 aCompletableFuturehere.- Throws:
IOException
-
createAsyncClusterConnection
public static AsyncClusterConnection createAsyncClusterConnection(URI uri, org.apache.hadoop.conf.Configuration conf, SocketAddress localAddress, User user) throws IOException Create a newAsyncClusterConnectioninstance. This is usually used in replication, the givenurispecifies 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 newAsyncClusterConnectioninstance to be used at server side where we have aConnectionRegistryEndpoint.- Throws:
IOException
-