com.google.cloud.bigtable.hbase1_x
Class BigtableConnection
- java.lang.Object
-
- org.apache.hadoop.hbase.client.AbstractBigtableConnection
-
- com.google.cloud.bigtable.hbase1_x.BigtableConnection
-
- All Implemented Interfaces:
- Closeable, AutoCloseable, Abortable, CommonConnection, Connection
public class BigtableConnection extends AbstractBigtableConnection
HBase 1.x specific implementation ofAbstractBigtableConnection
.- Version:
- $Id: $Id
- Author:
- sduskis
-
-
Field Summary
-
Fields inherited from class org.apache.hadoop.hbase.client.AbstractBigtableConnection
locatorCache
-
-
Constructor Summary
Constructors Constructor and Description BigtableConnection(org.apache.hadoop.conf.Configuration conf)
Constructor for BigtableConnection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description protected SampledRowKeysAdapter
createSampledRowKeysAdapter(TableName tableName, ServerName serverName)
There are some hbase 1.x and 2.x incompatibilities which require this abstract method.Admin
getAdmin()
List<HRegionInfo>
getAllRegionInfos(TableName tableName)
Retrieve a region information on a table.Table
getTable(TableName tableName, ExecutorService ignored)
-
Methods inherited from class org.apache.hadoop.hbase.client.AbstractBigtableConnection
abort, close, createAdapter, getBufferedMutator, getBufferedMutator, getConfiguration, getDisabledTables, getOptions, getRegionLocator, getSession, getTable, getTable, isAborted, isClosed, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.hadoop.hbase.client.Connection
getTableBuilder
-
-
-
-
Constructor Detail
-
BigtableConnection
public BigtableConnection(org.apache.hadoop.conf.Configuration conf) throws IOException
Constructor for BigtableConnection.- Parameters:
conf
- aConfiguration
object.- Throws:
IOException
- if any.
-
-
Method Detail
-
getAdmin
public Admin getAdmin() throws IOException
- Specified by:
getAdmin
in interfaceConnection
- Specified by:
getAdmin
in classAbstractBigtableConnection
- Throws:
IOException
-
createSampledRowKeysAdapter
protected SampledRowKeysAdapter createSampledRowKeysAdapter(TableName tableName, ServerName serverName)
Description copied from class:AbstractBigtableConnection
There are some hbase 1.x and 2.x incompatibilities which require this abstract method. SeeSampledRowKeysAdapter
for more details.- Specified by:
createSampledRowKeysAdapter
in classAbstractBigtableConnection
- Parameters:
tableName
- aTableName
object.serverName
- aServerName
object.- Returns:
- a
SampledRowKeysAdapter
object.
-
getTable
public Table getTable(TableName tableName, ExecutorService ignored) throws IOException
- Throws:
IOException
-
getAllRegionInfos
public List<HRegionInfo> getAllRegionInfos(TableName tableName) throws IOException
Description copied from interface:CommonConnection
Retrieve a region information on a table.- Parameters:
tableName
- Name of the table for which to return region info.- Returns:
- A
List
HRegionInfo object - Throws:
IOException
- if any.
-
-