virajjasani commented on a change in pull request #673: HBASE-23093 : Avoid
Optional Anti-Pattern where possible
URL: https://github.com/apache/hbase/pull/673#discussion_r333325326
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRegionLocatorHelper.java
##########
@@ -50,10 +49,17 @@ 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,
- Optional<MetricsConnection> metrics) {
+ MetricsConnection metrics) {
Review comment:
Done
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services