HorizonNet commented on a change in pull request #1062: HBASE-23705 Add 
CellComparator to HFileContext
URL: https://github.com/apache/hbase/pull/1062#discussion_r368309845
 
 

 ##########
 File path: 
hbase-common/src/main/java/org/apache/hadoop/hbase/CellComparatorImpl.java
 ##########
 @@ -377,6 +378,27 @@ private static int compareRows(byte[] left, int loffset, 
int llength, byte[] rig
       return result;
     }
 
+    @Override
+    public int compareRows(ByteBuffer row, Cell cell) {
+      byte [] array;
+      int offset;
+      int len = row.remaining();
+      if (row.hasArray()) {
+        array = row.array();
+        offset = row.position() + row.arrayOffset();
+      } else {
+        // This is awful, we copy the row array if offheap just so we can do a 
compare.
+        // We do this elsewhere too when Cell is backed by an offheap 
ByteBuffer.
+        // Needs fixing. TODO.
 
 Review comment:
   Is there already a Jira for this?

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

Reply via email to