z3n3r commented on a change in pull request #2445:
URL: https://github.com/apache/hbase/pull/2445#discussion_r506772765



##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncNonRootRegionLocator.java
##########
@@ -174,10 +184,14 @@ private boolean tryComplete(LocateRequest req, 
CompletableFuture<RegionLocations
         // startKey < req.row and endKey >= req.row. Here we split it to 
endKey == req.row ||
         // (endKey > req.row && startKey < req.row). The two conditions are 
equal since startKey <
         // endKey.
+        KeyValue.KVComparator comparator = 
getComparator(loc.getRegion().getTable());
         byte[] endKey = loc.getRegion().getEndKey();
-        int c = Bytes.compareTo(endKey, req.row);
+        int c = comparator.compareRows(endKey, 0, endKey.length,
+          req.row,0, req.row.length);

Review comment:
       There are interfaces of cell and bytebuffer in CellComparator so I can 
use them if the keys are in the appropriate although in this case they are just 
byte arrays. Did this answer your question?




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to