Package org.apache.hadoop.hbase.client
Class AsyncMetaRegionLocator
java.lang.Object
org.apache.hadoop.hbase.client.AsyncMetaRegionLocator
The asynchronous locator for meta region.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final AtomicReference<RegionLocations>private final AtomicReference<CompletableFuture<RegionLocations>>private final ConnectionRegistry
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprivate void(package private) void(package private) voidclearCache(ServerName serverName) private HRegionLocation(package private) int(package private) RegionLocations(package private) CompletableFuture<RegionLocations>getRegionLocations(int replicaId, boolean reload) Get the region locations for meta region.private void(package private) voidupdateCachedLocationOnError(HRegionLocation loc, Throwable exception) 
- 
Field Details- 
registry
- 
metaRegionLocations
- 
metaRelocateFuture
 
- 
- 
Constructor Details- 
AsyncMetaRegionLocatorAsyncMetaRegionLocator(ConnectionRegistry registry) 
 
- 
- 
Method Details- 
getRegionLocationsGet 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. ThereplicaIdparameter 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
- 
clearCachevoid clearCache()
- 
clearCache
- 
getRegionLocationInCache
- 
getNumberOfCachedRegionLocations
 
-