@InterfaceAudience.Public public interface AsyncConnection extends Closeable
Modifier and Type | Method and Description |
---|---|
void |
clearRegionLocationCache()
Clear all the entries in the region location cache, for all the tables.
|
default AsyncAdmin |
getAdmin()
Retrieve an
AsyncAdmin implementation to administer an HBase cluster. |
default AsyncAdmin |
getAdmin(ExecutorService pool)
Retrieve an
AsyncAdmin implementation to administer an HBase cluster. |
AsyncAdminBuilder |
getAdminBuilder()
Returns an
AsyncAdminBuilder for creating AsyncAdmin . |
AsyncAdminBuilder |
getAdminBuilder(ExecutorService pool)
Returns an
AsyncAdminBuilder for creating AsyncAdmin . |
default AsyncBufferedMutator |
getBufferedMutator(TableName tableName)
Retrieve an
AsyncBufferedMutator for performing client-side buffering of writes. |
default AsyncBufferedMutator |
getBufferedMutator(TableName tableName,
ExecutorService pool)
Retrieve an
AsyncBufferedMutator for performing client-side buffering of writes. |
AsyncBufferedMutatorBuilder |
getBufferedMutatorBuilder(TableName tableName)
Returns an
AsyncBufferedMutatorBuilder for creating AsyncBufferedMutator . |
AsyncBufferedMutatorBuilder |
getBufferedMutatorBuilder(TableName tableName,
ExecutorService pool)
Returns an
AsyncBufferedMutatorBuilder for creating AsyncBufferedMutator . |
org.apache.hadoop.conf.Configuration |
getConfiguration()
Returns the
Configuration object used by this instance. |
AsyncTableRegionLocator |
getRegionLocator(TableName tableName)
Retrieve a AsyncRegionLocator implementation to inspect region information on a table.
|
default AsyncTable<AdvancedScanResultConsumer> |
getTable(TableName tableName)
Retrieve an
AsyncTable implementation for accessing a table. |
default AsyncTable<ScanResultConsumer> |
getTable(TableName tableName,
ExecutorService pool)
Retrieve an
AsyncTable implementation for accessing a table. |
AsyncTableBuilder<AdvancedScanResultConsumer> |
getTableBuilder(TableName tableName)
Returns an
AsyncTableBuilder for creating AsyncTable . |
AsyncTableBuilder<ScanResultConsumer> |
getTableBuilder(TableName tableName,
ExecutorService pool)
Returns an
AsyncTableBuilder for creating AsyncTable . |
boolean |
isClosed()
Returns whether the connection is closed or not.
|
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 examinedvoid clearRegionLocationCache()
AsyncTableRegionLocator.clearRegionLocationCache()
.
This may cause performance issue so use it with caution.default 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 callbackboolean isClosed()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.