chunhui shen created HBASE-8452:
-----------------------------------

             Summary: Reduce byte copy in PrefixTreeSeeker
                 Key: HBASE-8452
                 URL: https://issues.apache.org/jira/browse/HBASE-8452
             Project: HBase
          Issue Type: Improvement
          Components: regionserver
    Affects Versions: 0.95.0
            Reporter: chunhui shen
            Assignee: chunhui shen


In PrefixTreeSeeker, I think we could do two improvement for deep copy of byte.

1.
{code}
PrefixTreeSeeker#getKeyValue(){
KeyValueUtil.copyToNewKeyValue(ptSearcher.current());
}
{code}
This method will be called frequently when reading. e.g. Scanner#peek(), 
Scanner comparison in KeyValueHeap

2.
{code}
PrefixTreeSeeker#seekToOrBeforeUsingPositionAtOrBefore(){
KeyValue.createKeyValueFromKey(keyOnlyBytes, offset, length);
}
PrefixTreeSeeker#seekToOrBeforeUsingPositionAtOrAfter(){
KeyValue.createKeyValueFromKey(keyOnlyBytes, offset, length);
}
{code}


Solution:
1.Using a cache for seeker's current keyvalue. 
2.Importing new KeyOnlyCell class without coping bytes.



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to