Skip to content

Commit

Permalink
removing redundant updateCachedLocationOnError
Browse files Browse the repository at this point in the history
  • Loading branch information
virajjasani committed Oct 8, 2019
1 parent 8ca960c commit a2a4082
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private void removeLocationFromCache(HRegionLocation loc) {

void updateCachedLocationOnError(HRegionLocation loc, Throwable exception) {
AsyncRegionLocatorHelper.updateCachedLocationOnError(loc, exception, this::getCacheLocation,
this::addLocationToCache, this::removeLocationFromCache);
this::addLocationToCache, this::removeLocationFromCache, null);
}

void clearCache() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@ static boolean canUpdateOnError(HRegionLocation loc, HRegionLocation oldLoc) {
oldLoc.getServerName().equals(loc.getServerName());
}

static void updateCachedLocationOnError(HRegionLocation loc, Throwable exception,
Function<HRegionLocation, HRegionLocation> cachedLocationSupplier,
Consumer<HRegionLocation> addToCache, Consumer<HRegionLocation> removeFromCache) {
updateCachedLocationOnError(loc, exception, cachedLocationSupplier, addToCache,
removeFromCache, null);
}

static void updateCachedLocationOnError(HRegionLocation loc, Throwable exception,
Function<HRegionLocation, HRegionLocation> cachedLocationSupplier,
Consumer<HRegionLocation> addToCache, Consumer<HRegionLocation> removeFromCache,
Expand Down

0 comments on commit a2a4082

Please sign in to comment.