@InterfaceAudience.Public public interface AsyncConnection extends Closeable
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.
AsyncTableRegionLocator getRegionLocator(TableName tableName)
tableName
- Name of the table who's region is to be examineddefault AsyncTable<AdvancedScanResultConsumer> getTable(TableName tableName)
AsyncTable
implementation for accessing a table.
The returned instance will use default configs. Use getTableBuilder(TableName)
if
you want to customize some configs.
This method no longer checks table existence. An exception will be thrown if the table does not exist only when the first operation is attempted.
The returned CompletableFuture
will be finished directly in the rpc framework's
callback thread, so typically you should not do any time consuming work inside these methods.
And also the observer style scan API will use AdvancedScanResultConsumer
which is
designed for experts only. Only use it when you know what you are doing.
tableName
- the name of the tablegetTableBuilder(TableName)
AsyncTableBuilder<AdvancedScanResultConsumer> getTableBuilder(TableName tableName)
AsyncTableBuilder
for creating AsyncTable
.
This method no longer checks table existence. An exception will be thrown if the table does not exist only when the first operation is attempted.
tableName
- the name of the tabledefault AsyncTable<ScanResultConsumer> getTable(TableName tableName, ExecutorService pool)
AsyncTable
implementation for accessing a table.
This method no longer checks table existence. An exception will be thrown if the table does not exist only when the first operation is attempted.
tableName
- the name of the tablepool
- the thread pool to use for executing callbackAsyncTableBuilder<ScanResultConsumer> getTableBuilder(TableName tableName, ExecutorService pool)
AsyncTableBuilder
for creating AsyncTable
.
This method no longer checks table existence. An exception will be thrown if the table does not exist only when the first operation is attempted.
tableName
- the name of the tablepool
- the thread pool to use for executing callbackdefault AsyncAdmin getAdmin()
AsyncAdmin
implementation to administer an HBase cluster.
The returned instance will use default configs. Use getAdminBuilder()
if you want to
customize some configs.
The admin operation's returned CompletableFuture
will be finished directly in the rpc
framework's callback thread, so typically you should not do any time consuming work inside
these methods.
AsyncAdmin
instance for cluster administrationAsyncAdminBuilder getAdminBuilder()
AsyncAdminBuilder
for creating AsyncAdmin
.
The admin operation's returned CompletableFuture
will be finished directly in the rpc
framework's callback thread, so typically you should not do any time consuming work inside
these methods.
default AsyncAdmin getAdmin(ExecutorService pool)
AsyncAdmin
implementation to administer an HBase cluster.
The returned instance will use default configs. Use getAdminBuilder(ExecutorService)
if you want to customize some configs.
pool
- the thread pool to use for executing callbackAsyncAdmin
instance for cluster administrationAsyncAdminBuilder getAdminBuilder(ExecutorService pool)
AsyncAdminBuilder
for creating AsyncAdmin
.pool
- the thread pool to use for executing callbackdefault AsyncBufferedMutator getBufferedMutator(TableName tableName)
AsyncBufferedMutator
for performing client-side buffering of writes.
The returned instance will use default configs. Use
getBufferedMutatorBuilder(TableName)
if you want to customize some configs.
tableName
- the name of the tableAsyncBufferedMutator
for the supplied tableName.AsyncBufferedMutatorBuilder getBufferedMutatorBuilder(TableName tableName)
AsyncBufferedMutatorBuilder
for creating AsyncBufferedMutator
.tableName
- the name of the tabledefault AsyncBufferedMutator getBufferedMutator(TableName tableName, ExecutorService pool)
AsyncBufferedMutator
for performing client-side buffering of writes.
The returned instance will use default configs. Use
getBufferedMutatorBuilder(TableName, ExecutorService)
if you want to customize some
configs.
tableName
- the name of the tablepool
- the thread pool to use for executing callbackAsyncBufferedMutator
for the supplied tableName.AsyncBufferedMutatorBuilder getBufferedMutatorBuilder(TableName tableName, ExecutorService pool)
AsyncBufferedMutatorBuilder
for creating AsyncBufferedMutator
.tableName
- the name of the tablepool
- the thread pool to use for executing callbackCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.