@InterfaceAudience.Private final class AsyncRegionLocatorHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOG |
| Modifier | Constructor and Description |
|---|---|
private |
AsyncRegionLocatorHelper() |
| Modifier and Type | Method and Description |
|---|---|
(package private) static boolean |
canUpdateOnError(HRegionLocation loc,
HRegionLocation oldLoc) |
(package private) static RegionLocations |
createRegionLocations(HRegionLocation loc) |
(package private) static boolean |
isGood(RegionLocations locs,
int replicaId) |
(package private) static RegionLocations |
removeRegionLocation(RegionLocations oldLocs,
int replicaId)
Create a new
RegionLocations based on the given oldLocs, and remove the
location for the given replicaId. |
(package private) static RegionLocations |
replaceRegionLocation(RegionLocations oldLocs,
HRegionLocation loc)
Create a new
RegionLocations based on the given oldLocs, and replace the
location for the given replicaId with the given loc. |
(package private) static void |
updateCachedLocationOnError(HRegionLocation loc,
Throwable exception,
Function<HRegionLocation,HRegionLocation> cachedLocationSupplier,
Consumer<HRegionLocation> addToCache,
Consumer<HRegionLocation> removeFromCache) |
private static final org.slf4j.Logger LOG
private AsyncRegionLocatorHelper()
static boolean canUpdateOnError(HRegionLocation loc, HRegionLocation oldLoc)
static void updateCachedLocationOnError(HRegionLocation loc, Throwable exception, Function<HRegionLocation,HRegionLocation> cachedLocationSupplier, Consumer<HRegionLocation> addToCache, Consumer<HRegionLocation> removeFromCache)
static RegionLocations createRegionLocations(HRegionLocation loc)
static RegionLocations replaceRegionLocation(RegionLocations oldLocs, HRegionLocation loc)
RegionLocations based on the given oldLocs, and replace the
location for the given replicaId with the given loc.
All the RegionLocations in async locator related class are immutable because we want to
access them concurrently, so here we need to create a new one, instead of calling
RegionLocations.updateLocation(HRegionLocation, boolean, boolean).static RegionLocations removeRegionLocation(RegionLocations oldLocs, int replicaId)
RegionLocations based on the given oldLocs, and remove the
location for the given replicaId.
All the RegionLocations in async locator related class are immutable because we want to
access them concurrently, so here we need to create a new one, instead of calling
RegionLocations.remove(int).static boolean isGood(RegionLocations locs, int replicaId)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.