@InterfaceAudience.Private class AsyncClusterConnectionImpl extends AsyncConnectionImpl implements AsyncClusterConnection
callerFactory, connConf, registry, RETRY_TIMER, rpcClient, rpcControllerFactory, rpcTimeout, user
Constructor and Description |
---|
AsyncClusterConnectionImpl(org.apache.hadoop.conf.Configuration conf,
ConnectionRegistry registry,
String clusterId,
SocketAddress localAddress,
User user) |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Boolean> |
bulkLoad(TableName tableName,
List<Pair<byte[],String>> familyPaths,
byte[] row,
boolean assignSeqNum,
org.apache.hadoop.security.token.Token<?> userToken,
String bulkToken,
boolean copyFiles,
List<String> clusterIds,
boolean replicate)
Securely bulk load a list of HFiles, passing additional list of clusters ids tracking clusters
where the given bulk load has already been processed (important for bulk loading replication).
|
CompletableFuture<Void> |
cleanupBulkLoad(TableName tableName,
String bulkToken)
Clean up after finishing bulk load, no matter success or not.
|
CompletableFuture<org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.FlushRegionResponse> |
flush(byte[] regionName,
boolean writeFlushWALMarker)
Flush a region and get the response.
|
CompletableFuture<List<ServerName>> |
getAllBootstrapNodes(ServerName regionServer)
Get the bootstrap node list of another region server.
|
CompletableFuture<List<ServerName>> |
getLiveRegionServers(MasterAddressTracker masterAddrTracker,
int count)
Get live region servers from masters.
|
NonceGenerator |
getNonceGenerator()
Get the nonce generator for this connection.
|
CompletableFuture<RegionLocations> |
getRegionLocations(TableName tableName,
byte[] row,
boolean reload)
Return all the replicas for a region.
|
AsyncRegionServerAdmin |
getRegionServerAdmin(ServerName serverName)
Get the admin service for the given region server.
|
RpcClient |
getRpcClient()
Get the rpc client we used to communicate with other servers.
|
CompletableFuture<String> |
prepareBulkLoad(TableName tableName)
Return the token for this bulk load.
|
CompletableFuture<Void> |
replicate(RegionInfo replica,
List<WAL.Entry> entries,
int retries,
long rpcTimeoutNs,
long operationTimeoutNs)
Replicate wal edits to a secondary replica.
|
clearMasterStubCache, clearRegionLocationCache, close, getAdminBuilder, getAdminBuilder, getAdminStub, getBackoffPolicy, getBufferedMutatorBuilder, getBufferedMutatorBuilder, getChoreService, getClusterId, getConfiguration, getConnectionMetrics, getConnectionRegistry, getHbck, getHbck, getLocator, getMasterStub, getRegionLocator, getRegionServerStub, getStatisticsTracker, getTableBuilder, getTableBuilder, getUser, isClosed, toConnection
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clearRegionLocationCache, getAdmin, getAdmin, getAdminBuilder, getAdminBuilder, getBufferedMutator, getBufferedMutator, getBufferedMutatorBuilder, getBufferedMutatorBuilder, getConfiguration, getHbck, getHbck, getRegionLocator, getTable, getTable, getTableBuilder, getTableBuilder, isClosed, toConnection
public AsyncClusterConnectionImpl(org.apache.hadoop.conf.Configuration conf, ConnectionRegistry registry, String clusterId, SocketAddress localAddress, User user)
public NonceGenerator getNonceGenerator()
AsyncClusterConnection
getNonceGenerator
in interface AsyncClusterConnection
getNonceGenerator
in class AsyncConnectionImpl
public RpcClient getRpcClient()
AsyncClusterConnection
getRpcClient
in interface AsyncClusterConnection
public AsyncRegionServerAdmin getRegionServerAdmin(ServerName serverName)
AsyncClusterConnection
getRegionServerAdmin
in interface AsyncClusterConnection
public CompletableFuture<org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.FlushRegionResponse> flush(byte[] regionName, boolean writeFlushWALMarker)
AsyncClusterConnection
flush
in interface AsyncClusterConnection
public CompletableFuture<RegionLocations> getRegionLocations(TableName tableName, byte[] row, boolean reload)
AsyncClusterConnection
getRegionLocations
in interface AsyncClusterConnection
public CompletableFuture<String> prepareBulkLoad(TableName tableName)
AsyncClusterConnection
prepareBulkLoad
in interface AsyncClusterConnection
public CompletableFuture<Boolean> bulkLoad(TableName tableName, List<Pair<byte[],String>> familyPaths, byte[] row, boolean assignSeqNum, org.apache.hadoop.security.token.Token<?> userToken, String bulkToken, boolean copyFiles, List<String> clusterIds, boolean replicate)
AsyncClusterConnection
bulkLoad
in interface AsyncClusterConnection
tableName
- the target tablefamilyPaths
- hdfs path for the the table family dirs containg files to be loaded.row
- row key.assignSeqNum
- seq num for the event on WAL.userToken
- user token.bulkToken
- bulk load token.copyFiles
- flag for copying the loaded hfiles.clusterIds
- list of cluster ids where the given bulk load has already been processed.replicate
- flags if the bulkload is targeted for replication.public CompletableFuture<Void> cleanupBulkLoad(TableName tableName, String bulkToken)
AsyncClusterConnection
cleanupBulkLoad
in interface AsyncClusterConnection
public CompletableFuture<List<ServerName>> getLiveRegionServers(MasterAddressTracker masterAddrTracker, int count)
AsyncClusterConnection
getLiveRegionServers
in interface AsyncClusterConnection
public CompletableFuture<List<ServerName>> getAllBootstrapNodes(ServerName regionServer)
AsyncClusterConnection
getAllBootstrapNodes
in interface AsyncClusterConnection
public CompletableFuture<Void> replicate(RegionInfo replica, List<WAL.Entry> entries, int retries, long rpcTimeoutNs, long operationTimeoutNs)
AsyncClusterConnection
replicate
in interface AsyncClusterConnection
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.