Package org.apache.hadoop.hbase.client
Class AsyncMetaRegionLocator
java.lang.Object
org.apache.hadoop.hbase.client.AsyncMetaRegionLocator
The asynchronous locator for meta region.
-
Field Summary
Modifier and TypeFieldDescriptionprivate final AtomicReference<RegionLocations>
private final AtomicReference<CompletableFuture<RegionLocations>>
private final ConnectionRegistry
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
(package private) void
(package private) void
clearCache
(ServerName serverName) private HRegionLocation
(package private) CompletableFuture<RegionLocations>
getRegionLocations
(int replicaId, boolean reload) Get the region locations for meta region.private void
(package private) void
updateCachedLocationOnError
(HRegionLocation loc, Throwable exception)
-
Field Details
-
registry
-
metaRegionLocations
-
metaRelocateFuture
-
-
Constructor Details
-
AsyncMetaRegionLocator
AsyncMetaRegionLocator(ConnectionRegistry registry)
-
-
Method Details
-
getRegionLocations
Get the region locations for meta region. If the location for the given replica is not available in the cached locations, then fetch from the HBase cluster. ThereplicaId
parameter is important. If the region replication config for meta region is changed, then the cached region locations may not have the locations for new replicas. If we do not check the location for the given replica, we will always return the cached region locations and cause an infinite loop. -
getCacheLocation
-
addLocationToCache
-
removeLocationFromCache
-
updateCachedLocationOnError
-
clearCache
void clearCache() -
clearCache
-