@InternalApi(value="For internal usage only") public abstract class AbstractBigtableConnection extends Object implements org.apache.hadoop.hbase.client.Connection, CommonConnection, Closeable
For internal use only - public for technical reasons.
Modifier and Type | Field and Description |
---|---|
protected Set<org.apache.hadoop.hbase.client.RegionLocator> |
locatorCache |
Modifier | Constructor and Description |
---|---|
|
AbstractBigtableConnection(org.apache.hadoop.conf.Configuration conf)
Constructor for AbstractBigtableConnection.
|
protected |
AbstractBigtableConnection(org.apache.hadoop.conf.Configuration conf,
boolean managed,
ExecutorService pool,
org.apache.hadoop.hbase.security.User user)
The constructor called from
ConnectionFactory.createConnection(Configuration) and in its
many forms via reflection with this specific signature. |
Modifier and Type | Method and Description |
---|---|
void |
abort(String msg,
Throwable t) |
void |
close() |
HBaseRequestAdapter |
createAdapter(org.apache.hadoop.hbase.TableName tableName) |
protected abstract SampledRowKeysAdapter |
createSampledRowKeysAdapter(org.apache.hadoop.hbase.TableName tableName,
org.apache.hadoop.hbase.ServerName serverName)
There are some hbase 1.x and 2.x incompatibilities which require this abstract method.
|
abstract org.apache.hadoop.hbase.client.Admin |
getAdmin() |
BigtableApi |
getBigtableApi()
Returns
BigtableApi object to access bigtable data and admin client APIs. |
BigtableHBaseSettings |
getBigtableSettings()
Returns instance of bigtable settings for classic or veneer client.
|
org.apache.hadoop.hbase.client.BufferedMutator |
getBufferedMutator(org.apache.hadoop.hbase.client.BufferedMutatorParams params) |
org.apache.hadoop.hbase.client.BufferedMutator |
getBufferedMutator(org.apache.hadoop.hbase.TableName tableName) |
org.apache.hadoop.conf.Configuration |
getConfiguration()
Returns the
Configuration object used by this instance. |
Set<org.apache.hadoop.hbase.TableName> |
getDisabledTables()
Getter for the field
disabledTables . |
org.apache.hadoop.hbase.client.RegionLocator |
getRegionLocator(org.apache.hadoop.hbase.TableName tableName) |
org.apache.hadoop.hbase.client.Table |
getTable(String tableName)
Deprecated.
|
org.apache.hadoop.hbase.client.Table |
getTable(org.apache.hadoop.hbase.TableName tableName) |
boolean |
isAborted() |
boolean |
isClosed() |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAllRegionInfos
protected final Set<org.apache.hadoop.hbase.client.RegionLocator> locatorCache
public AbstractBigtableConnection(org.apache.hadoop.conf.Configuration conf) throws IOException
conf
- a Configuration
object.IOException
- if any.protected AbstractBigtableConnection(org.apache.hadoop.conf.Configuration conf, boolean managed, ExecutorService pool, org.apache.hadoop.hbase.security.User user) throws IOException
ConnectionFactory.createConnection(Configuration)
and in its
many forms via reflection with this specific signature.conf
- The configuration for this channel. See BigtableOptionsFactory
for more details.managed
- This should always be false. It's an artifact of old HBase behavior.pool
- An ExecutorService
to run HBase/Bigtable object
conversions on. The RPCs themselves run via NIO, and not on a waiting threaduser
- This is an artifact of HBase which Cloud Bigtable ignores. User information is
captured in the Credentials configuration in conf.IOException
- if the setup is not correct. The most likely issue is ALPN or
OpenSSL misconfiguration.public org.apache.hadoop.conf.Configuration getConfiguration()
Configuration
object used by this instance. The reference returned is not a
copy, so any change made to it will affect this instance.getConfiguration
in interface CommonConnection
getConfiguration
in interface org.apache.hadoop.hbase.client.Connection
Configuration
object.public org.apache.hadoop.hbase.client.Table getTable(org.apache.hadoop.hbase.TableName tableName) throws IOException
getTable
in interface org.apache.hadoop.hbase.client.Connection
IOException
public org.apache.hadoop.hbase.client.BufferedMutator getBufferedMutator(org.apache.hadoop.hbase.client.BufferedMutatorParams params) throws IOException
getBufferedMutator
in interface org.apache.hadoop.hbase.client.Connection
IOException
public HBaseRequestAdapter createAdapter(org.apache.hadoop.hbase.TableName tableName)
public org.apache.hadoop.hbase.client.BufferedMutator getBufferedMutator(org.apache.hadoop.hbase.TableName tableName) throws IOException
getBufferedMutator
in interface org.apache.hadoop.hbase.client.Connection
IOException
@Deprecated public org.apache.hadoop.hbase.client.Table getTable(String tableName) throws IOException
tableName
- a String
object.Table
object.IOException
- if any.public org.apache.hadoop.hbase.client.RegionLocator getRegionLocator(org.apache.hadoop.hbase.TableName tableName) throws IOException
getRegionLocator
in interface org.apache.hadoop.hbase.client.Connection
IOException
protected abstract SampledRowKeysAdapter createSampledRowKeysAdapter(org.apache.hadoop.hbase.TableName tableName, org.apache.hadoop.hbase.ServerName serverName)
SampledRowKeysAdapter
for more details.tableName
- a TableName
object.serverName
- a ServerName
object.SampledRowKeysAdapter
object.public void abort(String msg, Throwable t)
abort
in interface org.apache.hadoop.hbase.Abortable
public boolean isClosed()
isClosed
in interface org.apache.hadoop.hbase.client.Connection
public boolean isAborted()
isAborted
in interface org.apache.hadoop.hbase.Abortable
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in interface org.apache.hadoop.hbase.client.Connection
IOException
public abstract org.apache.hadoop.hbase.client.Admin getAdmin() throws IOException
getAdmin
in interface org.apache.hadoop.hbase.client.Connection
IOException
public BigtableHBaseSettings getBigtableSettings()
CommonConnection
getBigtableSettings
in interface CommonConnection
BigtableHBaseSettings
instance.public Set<org.apache.hadoop.hbase.TableName> getDisabledTables()
disabledTables
.getDisabledTables
in interface CommonConnection
Set
object.public BigtableApi getBigtableApi()
CommonConnection
BigtableApi
object to access bigtable data and admin client APIs.getBigtableApi
in interface CommonConnection