Closeable
, AutoCloseable
, org.apache.hadoop.hbase.Abortable
, CommonConnection
, org.apache.hadoop.hbase.client.Connection
public abstract class AbstractBigtableConnection extends Object implements org.apache.hadoop.hbase.client.Connection, CommonConnection, Closeable
Abstract AbstractBigtableConnection class.
Modifier and Type | Field | Description |
---|---|---|
protected Set<org.apache.hadoop.hbase.client.RegionLocator> |
locatorCache |
Modifier | Constructor | 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 | 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() |
|
protected com.google.cloud.bigtable.grpc.BigtableTableAdminClient |
getBigtableTableAdminClient() |
getBigtableTableAdminClient.
|
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 . |
com.google.cloud.bigtable.config.BigtableOptions |
getOptions() |
Getter for the field
options . |
org.apache.hadoop.hbase.client.RegionLocator |
getRegionLocator(org.apache.hadoop.hbase.TableName tableName) |
|
com.google.cloud.bigtable.grpc.BigtableSession |
getSession() |
Getter for the field
session . |
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() |
getAllRegionInfos
protected final Set<org.apache.hadoop.hbase.client.RegionLocator> locatorCache
public AbstractBigtableConnection(org.apache.hadoop.conf.Configuration conf) throws IOException
Constructor for AbstractBigtableConnection.
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
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.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 AutoCloseable
close
in interface Closeable
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
protected com.google.cloud.bigtable.grpc.BigtableTableAdminClient getBigtableTableAdminClient() throws IOException
getBigtableTableAdminClient.
BigtableTableAdminClient
object.IOException
- if any.public com.google.cloud.bigtable.config.BigtableOptions getOptions()
Getter for the field options
.
getOptions
in interface CommonConnection
BigtableOptions
object.public Set<org.apache.hadoop.hbase.TableName> getDisabledTables()
Getter for the field disabledTables
.
getDisabledTables
in interface CommonConnection
Set
object.public com.google.cloud.bigtable.grpc.BigtableSession getSession()
Getter for the field session
.
getSession
in interface CommonConnection
BigtableSession
object.