You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Matt Corgan (JIRA)" <ji...@apache.org> on 2013/04/29 08:36:16 UTC
[jira] [Commented] (HBASE-8452) Reduce byte copy in
PrefixTreeSeeker
[ https://issues.apache.org/jira/browse/HBASE-8452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13644305#comment-13644305 ]
Matt Corgan commented on HBASE-8452:
------------------------------------
The idea seems good. I hadn't done optimizations like this because I hope at some point we can change the getKeyValue method to getCell where it won't need copying. Until that's done, something like this is ok.
> 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
> Attachments: hbase-8452-trunkv1.patch
>
>
> 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