Package org.apache.hadoop.hbase.client
Class AsyncRegionLocator
java.lang.Object
org.apache.hadoop.hbase.client.AsyncRegionLocator
The asynchronous region locator.
-
Field Summary
Modifier and TypeFieldDescriptionprivate final AsyncConnectionImpl
private static final org.slf4j.Logger
private final AsyncMetaRegionLocator
private final AsyncNonMetaRegionLocator
private final org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer
-
Constructor Summary
ConstructorDescriptionAsyncRegionLocator
(AsyncConnectionImpl conn, org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer retryTimer) -
Method Summary
Modifier and TypeMethodDescription(package private) void
(package private) void
clearCache
(ServerName serverName) (package private) void
clearCache
(TableName tableName) (package private) AsyncNonMetaRegionLocator
(package private) int
getNumberOfCachedRegionLocations
(TableName tableName) (package private) CompletableFuture<HRegionLocation>
getRegionLocation
(TableName tableName, byte[] row, int replicaId, RegionLocateType type, boolean reload, long timeoutNs) (package private) CompletableFuture<HRegionLocation>
getRegionLocation
(TableName tableName, byte[] row, int replicaId, RegionLocateType type, long timeoutNs) (package private) CompletableFuture<HRegionLocation>
getRegionLocation
(TableName tableName, byte[] row, RegionLocateType type, boolean reload, long timeoutNs) (package private) CompletableFuture<HRegionLocation>
getRegionLocation
(TableName tableName, byte[] row, RegionLocateType type, long timeoutNs) (package private) RegionLocations
getRegionLocationInCache
(TableName tableName, byte[] row) (package private) CompletableFuture<RegionLocations>
getRegionLocations
(TableName tableName, byte[] row, RegionLocateType type, boolean reload, long timeoutNs) getRegionNames
(HRegionLocation location) private boolean
private <T> CompletableFuture<T>
tracedLocationFuture
(Supplier<CompletableFuture<T>> action, Function<T, List<String>> getRegionNames, Supplier<io.opentelemetry.api.trace.Span> spanSupplier) (package private) void
updateCachedLocationOnError
(HRegionLocation loc, Throwable exception) private <T> CompletableFuture<T>
withTimeout
(CompletableFuture<T> future, long timeoutNs, Supplier<String> timeoutMsg)
-
Field Details
-
LOG
-
retryTimer
-
conn
-
metaRegionLocator
-
nonMetaRegionLocator
-
-
Constructor Details
-
AsyncRegionLocator
AsyncRegionLocator(AsyncConnectionImpl conn, org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer retryTimer)
-
-
Method Details
-
withTimeout
private <T> CompletableFuture<T> withTimeout(CompletableFuture<T> future, long timeoutNs, Supplier<String> timeoutMsg) -
isMeta
-
tracedLocationFuture
private <T> CompletableFuture<T> tracedLocationFuture(Supplier<CompletableFuture<T>> action, Function<T, List<String>> getRegionNames, Supplier<io.opentelemetry.api.trace.Span> spanSupplier) -
getRegionNames
-
getRegionNames
-
getRegionLocations
CompletableFuture<RegionLocations> getRegionLocations(TableName tableName, byte[] row, RegionLocateType type, boolean reload, long timeoutNs) -
getRegionLocation
CompletableFuture<HRegionLocation> getRegionLocation(TableName tableName, byte[] row, int replicaId, RegionLocateType type, boolean reload, long timeoutNs) -
getRegionLocation
CompletableFuture<HRegionLocation> getRegionLocation(TableName tableName, byte[] row, int replicaId, RegionLocateType type, long timeoutNs) -
getRegionLocation
CompletableFuture<HRegionLocation> getRegionLocation(TableName tableName, byte[] row, RegionLocateType type, boolean reload, long timeoutNs) -
getRegionLocation
CompletableFuture<HRegionLocation> getRegionLocation(TableName tableName, byte[] row, RegionLocateType type, long timeoutNs) -
updateCachedLocationOnError
-
clearCache
-
clearCache
-
clearCache
void clearCache() -
getNonMetaRegionLocator
-
getRegionLocationInCache
-
getNumberOfCachedRegionLocations
-