hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Hofhansl (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-3433) Remove the KV copy of every KV in Scan; introduced by HBASE-3232 (why doesn't keyonlyfilter make copies rather than mutate -- HBASE-3211)?
Date Fri, 11 Nov 2011 18:13:51 GMT

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

Lars Hofhansl commented on HBASE-3433:
--------------------------------------

Good point about "public", does not have to be. That is actually the part of the patch I like
the least. SQM now "leaks" the filter, and StoreScanner has know about filters. I was also
thinking about adding a transform() method to SQM, that would basically do the same as the
added code in StoreScanner; StoreScanner would then call SQM.transform(kv). I think I'll just
make this method package private.

Will update the Javadoc too and post a new patch soon.

Could add this to 0.92 as well. As I said, Filter and FilterBase should be considered public
API, so it *is* an API change. That said, I'm fine with this in 0.92. It's a slight change
as most folks would use FilterBase anyway.

                
> Remove the KV copy of every KV in Scan; introduced by HBASE-3232 (why doesn't keyonlyfilter
make copies rather than mutate -- HBASE-3211)?
> ------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-3433
>                 URL: https://issues.apache.org/jira/browse/HBASE-3433
>             Project: HBase
>          Issue Type: Improvement
>          Components: performance, regionserver
>            Reporter: stack
>            Assignee: Lars Hofhansl
>            Priority: Critical
>             Fix For: 0.94.0
>
>         Attachments: 3433-v2.txt, 3433.txt, HBASE-3433-sidenote.patch
>
>
> Here is offending code from inside in StoreScanner#next:
> {code}
>       // kv is no longer immutable due to KeyOnlyFilter! use copy for safety
>       KeyValue copyKv = new KeyValue(kv.getBuffer(), kv.getOffset(), kv.getLength());
> {code}
> This looks wrong given philosophy up to this has been avoidance of garbage-making copies.
> Maybe this has been looked into before and this is the only thing to be done but why
is KeyOnlyFilter not making copies rather than mutating originals?
> Making this critical against 0.92.

--
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

        

Mime
View raw message