[
https://issues.apache.org/jira/browse/HBASE-14099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14634472#comment-14634472
]
Anoop Sam John commented on HBASE-14099:
----------------------------------------
bq.What if the first Cell in a StoreFile is a delete marker?
When first cell in store file is delete marker for the given rowkey
(largestScanRow) , then we can NOT avoid this file and have to read. So the
return of this method has to be true.
Then the check getComparator().compareRows(firstKeyKV, largestScanRow, 0,
largestScanRow.length) > 0 will be false and
getComparator().compareRows(lastKeyKV, smallestScanRow, 0,
smallestScanRow.length) < 0 also will be false for sure. This wil make the
boolean false and we return true.
> StoreFile.passesKeyRangeFilter need not create Cells from the Scan's start
> and stop Row
> ---------------------------------------------------------------------------------------
>
> Key: HBASE-14099
> URL: https://issues.apache.org/jira/browse/HBASE-14099
> Project: HBase
> Issue Type: Improvement
> Components: Performance, Scanners
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Fix For: 2.0.0
>
> Attachments: HBASE-14099.patch, HBASE-14099_1.patch,
> HBASE-14099_2.patch, HBASE-14099_3.patch, HBASE-14099_4.patch, storefile.png
>
>
> During profiling saw that the code here in passesKeyRangeFilter in Storefile
> {code}
> KeyValue smallestScanKeyValue = scan.isReversed() ? KeyValueUtil
> .createFirstOnRow(scan.getStopRow()) :
> KeyValueUtil.createFirstOnRow(scan
> .getStartRow());
> KeyValue largestScanKeyValue = scan.isReversed() ? KeyValueUtil
> .createLastOnRow(scan.getStartRow()) :
> KeyValueUtil.createLastOnRow(scan
> .getStopRow());
> {code}
> This row need not be copied now considering that we have
> CellComparator.compareRows(Cell, byte[]).
> We have already refactored the firstKeyKv and lastKeyKV as part of other
> JIRAs.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)