[
https://issues.apache.org/jira/browse/HBASE-5997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13277704#comment-13277704
]
Anoop Sam John commented on HBASE-5997:
---------------------------------------
As I mentioned there are 2 issues
1. We need to change the if check such that return false when the passed key is
equal to the splitkey also. Because in the file there wont be any KV with
rowkey less than the splitkey. That will be obviously in the bottom half.
2. In the comparator we pass the passed key as the left item and the split key
byte[] as the right item. The split key always byte[] will contains
rowkeylenth + rowkey. There wont be any bytes corresponding to CF name or
qualifier name or the timestamp bytes. So when the passed key is with
rowkey=splitkey and contains any bytes corresponding to any of these items (
well this is key of KV and contain any ) the comparator will return a value >0
Calls getting to this API from HBase code pass only rowkey(rowkeylenth +
rowkey) and a timestamp [timestamp=HConstants.LATEST_TIMESTAMP] But no CF name
and qualifier name. So if the top file contains KVs with rowkey as splitkey
still all those KVs will look as greater than the passed key as every KV will
contain the CF name bytes after the rowkey bytes. So always it will seek into
the bottom half.
Can we take only the part of the byte[] passed to this method ( seekBefore)? We
need to take only the bytes rowkeylenth + rowkey
like below
{code}
- if (getComparator().compare(key, offset, length, splitkey, 0,
- splitkey.length) < 0) {
+ short lrowlength = Bytes.toShort(key, offset);
+ if (getComparator().compare(key, offset, lrowlength, splitkey, 0,
+ splitkey.length) <= 0) {
{code}
> Fix concerns raised in HBASE-5922 related to HalfStoreFileReader
> ----------------------------------------------------------------
>
> Key: HBASE-5997
> URL: https://issues.apache.org/jira/browse/HBASE-5997
> Project: HBase
> Issue Type: Bug
> Reporter: ramkrishna.s.vasudevan
> Assignee: Anoop Sam John
>
> Pls refer to the comment
> https://issues.apache.org/jira/browse/HBASE-5922?focusedCommentId=13269346&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13269346.
> Raised this issue to solve that comment. Just incase we don't forget it.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira