saintstack commented on a change in pull request #1062: HBASE-23705 Add
CellComparator to HFileContext
URL: https://github.com/apache/hbase/pull/1062#discussion_r368615118
##########
File path:
hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/RowIndexSeekerV1.java
##########
@@ -131,8 +131,7 @@ private int binarySearch(Cell seekCell, boolean
seekBefore) {
int comp = 0;
while (low <= high) {
mid = low + ((high - low) >> 1);
- ByteBuffer row = getRow(mid);
- comp = compareRows(row, seekCell);
+ comp = this.cellComparator.compareRows(getRow(mid), seekCell);
Review comment:
There is a similar array-based compare rows in CellComparator.
See above for my argument that encoders should not each have to do their own
figuring of cell compare.
Notice how much cleaner the code in here is now?
----------------------------------------------------------------
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