@InterfaceAudience.Private class AsyncConnectionImpl extends Object implements AsyncConnection
Modifier and Type | Field and Description |
---|---|
private ConcurrentMap<String,org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.Interface> |
adminSubs |
(package private) AsyncRpcRetryingCallerFactory |
callerFactory |
private org.apache.hadoop.conf.Configuration |
conf |
(package private) AsyncConnectionConfiguration |
connConf |
private boolean |
hostnameCanChange |
private AsyncRegionLocator |
locator |
private static org.slf4j.Logger |
LOG |
private AtomicReference<org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.MasterService.Interface> |
masterStub |
private AtomicReference<CompletableFuture<org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.MasterService.Interface>> |
masterStubMakeFuture |
private NonceGenerator |
nonceGenerator |
(package private) AsyncRegistry |
registry |
private static String |
RESOLVE_HOSTNAME_ON_FAIL_KEY |
(package private) static org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer |
RETRY_TIMER |
private RpcClient |
rpcClient |
(package private) RpcControllerFactory |
rpcControllerFactory |
private int |
rpcTimeout |
private ConcurrentMap<String,org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.Interface> |
rsStubs |
private User |
user |
Constructor and Description |
---|
AsyncConnectionImpl(org.apache.hadoop.conf.Configuration conf,
AsyncRegistry registry,
String clusterId,
User user) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
private org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.Interface |
createAdminServerStub(ServerName serverName) |
private org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.MasterService.Interface |
createMasterStub(ServerName serverName) |
private org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.Interface |
createRegionServerStub(ServerName serverName) |
AsyncAdminBuilder |
getAdminBuilder()
Returns an
AsyncAdminBuilder for creating AsyncAdmin . |
AsyncAdminBuilder |
getAdminBuilder(ExecutorService pool)
Returns an
AsyncAdminBuilder for creating AsyncAdmin . |
(package private) org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.Interface |
getAdminStub(ServerName serverName) |
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. |
CompletableFuture<Hbck> |
getHbck()
Retrieve an Hbck implementation to fix an HBase cluster.
|
Hbck |
getHbck(ServerName masterServer)
Retrieve an Hbck implementation to fix an HBase cluster.
|
(package private) AsyncRegionLocator |
getLocator() |
(package private) CompletableFuture<org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.MasterService.Interface> |
getMasterStub() |
NonceGenerator |
getNonceGenerator() |
AsyncTableRegionLocator |
getRegionLocator(TableName tableName)
Retrieve a AsyncRegionLocator implementation to inspect region information on a table.
|
(package private) org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.Interface |
getRegionServerStub(ServerName serverName) |
private HBaseRpcController |
getRpcController() |
AsyncTableBuilder<AdvancedScanResultConsumer> |
getTableBuilder(TableName tableName)
Returns an
AsyncTableBuilder for creating AsyncTable . |
AsyncTableBuilder<ScanResultConsumer> |
getTableBuilder(TableName tableName,
ExecutorService pool)
Returns an
AsyncTableBuilder for creating AsyncTable . |
private void |
makeMasterStub(CompletableFuture<org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.MasterService.Interface> future) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAdmin, getAdmin, getBufferedMutator, getBufferedMutator, getTable, getTable
private static final org.slf4j.Logger LOG
static final org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer RETRY_TIMER
private static final String RESOLVE_HOSTNAME_ON_FAIL_KEY
private final org.apache.hadoop.conf.Configuration conf
final AsyncConnectionConfiguration connConf
final AsyncRegistry registry
private final int rpcTimeout
final RpcControllerFactory rpcControllerFactory
private final boolean hostnameCanChange
private final AsyncRegionLocator locator
final AsyncRpcRetryingCallerFactory callerFactory
private final NonceGenerator nonceGenerator
private final ConcurrentMap<String,org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.Interface> rsStubs
private final ConcurrentMap<String,org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.Interface> adminSubs
private final AtomicReference<org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.MasterService.Interface> masterStub
private final AtomicReference<CompletableFuture<org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.MasterService.Interface>> masterStubMakeFuture
public AsyncConnectionImpl(org.apache.hadoop.conf.Configuration conf, AsyncRegistry registry, String clusterId, User user)
public org.apache.hadoop.conf.Configuration getConfiguration()
AsyncConnection
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 AsyncConnection
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public AsyncTableRegionLocator getRegionLocator(TableName tableName)
AsyncConnection
getRegionLocator
in interface AsyncConnection
tableName
- Name of the table who's region is to be examinedAsyncRegionLocator getLocator()
public NonceGenerator getNonceGenerator()
private org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.Interface createRegionServerStub(ServerName serverName) throws IOException
IOException
org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.Interface getRegionServerStub(ServerName serverName) throws IOException
IOException
private org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.MasterService.Interface createMasterStub(ServerName serverName) throws IOException
IOException
private org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.Interface createAdminServerStub(ServerName serverName) throws IOException
IOException
org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.Interface getAdminStub(ServerName serverName) throws IOException
IOException
private void makeMasterStub(CompletableFuture<org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.MasterService.Interface> future)
CompletableFuture<org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.MasterService.Interface> getMasterStub()
private HBaseRpcController getRpcController()
public AsyncTableBuilder<AdvancedScanResultConsumer> getTableBuilder(TableName tableName)
AsyncConnection
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.
getTableBuilder
in interface AsyncConnection
tableName
- the name of the tablepublic AsyncTableBuilder<ScanResultConsumer> getTableBuilder(TableName tableName, ExecutorService pool)
AsyncConnection
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.
getTableBuilder
in interface AsyncConnection
tableName
- the name of the tablepool
- the thread pool to use for executing callbackpublic AsyncAdminBuilder getAdminBuilder()
AsyncConnection
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.
getAdminBuilder
in interface AsyncConnection
public AsyncAdminBuilder getAdminBuilder(ExecutorService pool)
AsyncConnection
AsyncAdminBuilder
for creating AsyncAdmin
.getAdminBuilder
in interface AsyncConnection
pool
- the thread pool to use for executing callbackpublic AsyncBufferedMutatorBuilder getBufferedMutatorBuilder(TableName tableName)
AsyncConnection
AsyncBufferedMutatorBuilder
for creating AsyncBufferedMutator
.getBufferedMutatorBuilder
in interface AsyncConnection
tableName
- the name of the tablepublic AsyncBufferedMutatorBuilder getBufferedMutatorBuilder(TableName tableName, ExecutorService pool)
AsyncConnection
AsyncBufferedMutatorBuilder
for creating AsyncBufferedMutator
.getBufferedMutatorBuilder
in interface AsyncConnection
tableName
- the name of the tablepool
- the thread pool to use for executing callbackpublic CompletableFuture<Hbck> getHbck()
AsyncConnection
Closeable.close()
on the returned Hbck instance.
This will be used mostly by hbck tool.getHbck
in interface AsyncConnection
public Hbck getHbck(ServerName masterServer) throws IOException
AsyncConnection
Closeable.close()
on the returned Hbck instance.
This will be used mostly by hbck tool. This may only be used to by pass getting registered
master from ZK. In situations where ZK is not available or active master is not registered with
ZK and user can get master address by other means, master can be explicitly specified.getHbck
in interface AsyncConnection
masterServer
- explicit ServerName
for master serverIOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.