You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "ramkrishna.s.vasudevan (JIRA)" <ji...@apache.org> on 2014/03/25 09:30:43 UTC
[jira] [Updated] (HBASE-10826) PrefixTree seekTo does not seek to
the correct key if the given key is not in the existing kvs
[ https://issues.apache.org/jira/browse/HBASE-10826?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ramkrishna.s.vasudevan updated HBASE-10826:
-------------------------------------------
Summary: PrefixTree seekTo does not seek to the correct key if the given key is not in the existing kvs (was: PrefixTree seekTo does not seek to the correct key if the given key is not in the exisitng kvs)
> PrefixTree seekTo does not seek to the correct key if the given key is not in the existing kvs
> ----------------------------------------------------------------------------------------------
>
> Key: HBASE-10826
> URL: https://issues.apache.org/jira/browse/HBASE-10826
> Project: HBase
> Issue Type: Bug
> Components: Scanners
> Affects Versions: 0.96.2, 0.98.1, 0.99.0
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Critical
> Labels: prefixtree
> Attachments: TestSeekToBlockWithEncoders.java
>
>
> {code}
> KeyValue kv1 = new KeyValue(Bytes.toBytes("aaa"), Bytes.toBytes("fam1"), Bytes.toBytes("q1"),
> Bytes.toBytes("val"));
> writer.append(kv1);
> KeyValue kv2 = new KeyValue(Bytes.toBytes("aab"), Bytes.toBytes("fam1"), Bytes.toBytes("q1"),
> Bytes.toBytes("val"));
> writer.append(kv2);
> KeyValue kv4 = new KeyValue(Bytes.toBytes("aac"), Bytes.toBytes("fam1"), Bytes.toBytes("q1"),
> Bytes.toBytes("val"));
> writer.append(kv4);
> KeyValue kv5 = new KeyValue(Bytes.toBytes("aac"), Bytes.toBytes("fam12"), Bytes.toBytes("q2"),
> Bytes.toBytes("val"));
> writer.append(kv5);
> {code}
> {code}
> KeyValue toSeek = new KeyValue(Bytes.toBytes("aac"), Bytes.toBytes("fam1"),
> Bytes.toBytes("q2"), Bytes.toBytes("val"));
> StoreFileScanner s = reader.getStoreFileScanner(false, false);
> s.reseek(toSeek);
> {code}
> Now calling s.next() should point to the last KV - kv5.
> Before calling s.next() it would have done a moveToPrevious since there is no KV that exactly matches with the toSeek key.
> Incase of NONE, PREFIX, DIFF, FAST_DIFF things work fine as expected.
> But in case of Prefix Tree, calling reseek() points to a key that is same as the toSeek key which does not exist at all.
> Will attach a testcase that shows this problem.
--
This message was sent by Atlassian JIRA
(v6.2#6252)