@InterfaceAudience.Private final class ConnectionRegistryFactory extends Object
ConnectionRegistry
.Modifier and Type | Field and Description |
---|---|
private static org.apache.hbase.thirdparty.com.google.common.collect.ImmutableMap<String,ConnectionRegistryURIFactory> |
FACTORIES |
private static org.slf4j.Logger |
LOG |
Modifier | Constructor and Description |
---|---|
private |
ConnectionRegistryFactory() |
Modifier and Type | Method and Description |
---|---|
(package private) static ConnectionRegistry |
create(org.apache.hadoop.conf.Configuration conf,
User user)
Returns the connection registry implementation to use.
|
(package private) static ConnectionRegistry |
create(URI uri,
org.apache.hadoop.conf.Configuration conf,
User user)
Returns the connection registry implementation to use, for the given connection url
uri . |
private static final org.slf4j.Logger LOG
private static final org.apache.hbase.thirdparty.com.google.common.collect.ImmutableMap<String,ConnectionRegistryURIFactory> FACTORIES
private ConnectionRegistryFactory()
static ConnectionRegistry create(URI uri, org.apache.hadoop.conf.Configuration conf, User user) throws IOException
uri
.
We use ServiceLoader
to load different implementations, and use the scheme of the given
uri
to select. And if there is no protocol specified, or we can not find a
ConnectionRegistryURIFactory
implementation for the given scheme, we will fallback to
use the old way to create the ConnectionRegistry
. Notice that, if fallback happens, the
specified connection url uri
will not take effect, we will load all the related
configurations from the given Configuration instance conf
IOException
static ConnectionRegistry create(org.apache.hadoop.conf.Configuration conf, User user)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.