bbeaudreault commented on code in PR #5037:
URL: https://github.com/apache/hbase/pull/5037#discussion_r1111106674


##########
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncNonMetaRegionLocator.java:
##########
@@ -450,13 +601,11 @@ private RegionLocations locateRowInCache(TableCache 
tableCache, TableName tableN
   private RegionLocations locateRowBeforeInCache(TableCache tableCache, 
TableName tableName,
     byte[] row, int replicaId) {
     boolean isEmptyStopRow = isEmptyStopRow(row);
-    Map.Entry<byte[], RegionLocations> entry =
-      isEmptyStopRow ? tableCache.cache.lastEntry() : 
tableCache.cache.lowerEntry(row);
-    if (entry == null) {
+    RegionLocations locs = 
tableCache.regionLocationCache.findForBeforeRow(row);

Review Comment:
   Moved this logic into findForBeforeRow (and similar for findForRow)



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to