[ 
https://issues.apache.org/jira/browse/HBASE-9000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13807651#comment-13807651
 ] 

Liang Xie commented on HBASE-9000:
----------------------------------

Just my understanding: our current impl in trunk or the old 0.89-fb impl seems 
not optimized against all cases,  one type of case probably is friendly with 
current  logarithmic seek imple(tailSet), e.g.  lots of kv needs to be skipped; 
 another type of case is friendly with linear reseek, e.g. the target kv is 
near with the previous position, like 0.89-fb's old impl like :
{code}
     public boolean reseek(KeyValue key) {
      while (kvsetNextRow != null &&
          comparator.compare(kvsetNextRow, key) < 0) {
        kvsetNextRow = getNext(kvsetIt);
     }
    ...
{code}

to me, it's reasonable to have a setting value to : let the cheaper linear 
reseek go first, then fallback to more expensive seek() ops after reaching a 
config value.

> Linear reseek in Memstore
> -------------------------
>
>                 Key: HBASE-9000
>                 URL: https://issues.apache.org/jira/browse/HBASE-9000
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 0.89-fb
>            Reporter: Shane Hogan
>            Priority: Minor
>             Fix For: 0.89-fb
>
>
> This is to address the linear reseek in MemStoreScanner. Currently reseek 
> iterates over the kvset and the snapshot linearly by just calling next 
> repeatedly. The new solution is to do this linear seek up to a configurable 
> maximum amount of times then if the seek is not yet complete fall back to 
> logarithmic seek.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to