org.apache.hadoop.hbase.client
Class BigtableAsyncConnection
- java.lang.Object
-
- org.apache.hadoop.hbase.client.BigtableAsyncConnection
-
- All Implemented Interfaces:
- Closeable, AutoCloseable, AsyncConnection, CommonConnection
public class BigtableAsyncConnection extends Object implements AsyncConnection, CommonConnection, Closeable
Bigtable implementation ofAsyncConnection
- Author:
- spollapally
-
-
Constructor Summary
Constructors Constructor and Description BigtableAsyncConnection(org.apache.hadoop.conf.Configuration conf)
BigtableAsyncConnection(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.client.AsyncRegistry ignoredRegistry, String ignoredClusterId, User ignoredUser)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.hadoop.hbase.client.AsyncConnection
getAdmin, getAdmin, getBufferedMutator, getBufferedMutator, getTable, getTable
-
-
-
-
Constructor Detail
-
BigtableAsyncConnection
public BigtableAsyncConnection(org.apache.hadoop.conf.Configuration conf) throws IOException
- Throws:
IOException
-
BigtableAsyncConnection
public BigtableAsyncConnection(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.client.AsyncRegistry ignoredRegistry, String ignoredClusterId, User ignoredUser) throws IOException
- Throws:
IOException
-
-
Method Detail
-
createAdapter
public HBaseRequestAdapter createAdapter(TableName tableName)
-
getSession
public BigtableSession getSession()
Description copied from interface:CommonConnection
Get aBigtableSession
on which operations can be performed.- Specified by:
getSession
in interfaceCommonConnection
- Returns:
- a
BigtableSession
object.
-
getOptions
public BigtableOptions getOptions()
Description copied from interface:CommonConnection
Getter for the fieldoptions
.- Specified by:
getOptions
in interfaceCommonConnection
- Returns:
- a
BigtableOptions
object.
-
getDisabledTables
public Set<TableName> getDisabledTables()
Description copied from interface:CommonConnection
Getter for the fielddisabledTables
.- Specified by:
getDisabledTables
in interfaceCommonConnection
- Returns:
- a
Set
object that are disabled.
-
close
public void close() throws IOException
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
-
getConfiguration
public org.apache.hadoop.conf.Configuration getConfiguration()
Description copied from interface:CommonConnection
Returns theConfiguration
object used by this instance. The reference returned is not a copy, so any change made to it will affect this instance.- Specified by:
getConfiguration
in interfaceAsyncConnection
- Specified by:
getConfiguration
in interfaceCommonConnection
- Returns:
- a
Configuration
object.
-
getAdminBuilder
public AsyncAdminBuilder getAdminBuilder()
- Specified by:
getAdminBuilder
in interfaceAsyncConnection
-
getAdminBuilder
public AsyncAdminBuilder getAdminBuilder(ExecutorService arg0)
- Specified by:
getAdminBuilder
in interfaceAsyncConnection
-
getBufferedMutatorBuilder
public AsyncBufferedMutatorBuilder getBufferedMutatorBuilder(TableName tableName)
- Specified by:
getBufferedMutatorBuilder
in interfaceAsyncConnection
-
getBufferedMutatorBuilder
public AsyncBufferedMutatorBuilder getBufferedMutatorBuilder(TableName tableName, ExecutorService es)
- Specified by:
getBufferedMutatorBuilder
in interfaceAsyncConnection
-
getTableBuilder
public AsyncTableBuilder<AdvancedScanResultConsumer> getTableBuilder(TableName tableName)
- Specified by:
getTableBuilder
in interfaceAsyncConnection
-
getRegionLocator
public AsyncTableRegionLocator getRegionLocator(TableName tableName)
- Specified by:
getRegionLocator
in interfaceAsyncConnection
-
getTableBuilder
public AsyncTableBuilder<ScanResultConsumer> getTableBuilder(TableName tableName, ExecutorService ignored)
- Specified by:
getTableBuilder
in interfaceAsyncConnection
-
getAllRegionInfos
public List<HRegionInfo> getAllRegionInfos(TableName tableName) throws IOException
Description copied from interface:CommonConnection
Retrieve a region information on a table.- Specified by:
getAllRegionInfos
in interfaceCommonConnection
- Parameters:
tableName
- Name of the table for which to return region info.- Returns:
- A
List
HRegionInfo object - Throws:
IOException
- if any.
-
getHbck
public Hbck getHbck(ServerName serverName)
- Specified by:
getHbck
in interfaceAsyncConnection
-
getHbck
public CompletableFuture<Hbck> getHbck()
- Specified by:
getHbck
in interfaceAsyncConnection
-
-