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

Raymond Liu commented on HBASE-7387:
------------------------------------

Hi, Todd
Yes, I agree that an internal logic change or optimization might break the 
subclassed class. While this also apply to a duplicate one. Which one is more 
fragile I think depends on how much internal code detail they involved. In my 
case, I reuse all the other part of code, Just replace the next() method. In 
this next method, I have my custom encoded kv decode to several kvs, and do 
match and filter upon each of them, and also handling staff like seek_next_col 
etc. This part of code I think is some how isolated from the other part, so for 
my case, subclass is much less influenced by future code change compare with 
duplicate code. And make storescanner subclassable don't prevent other people 
from duplicate the code if they wish I guess ;)
                
> StoreScanner need to be able to be subclassed
> ---------------------------------------------
>
>                 Key: HBASE-7387
>                 URL: https://issues.apache.org/jira/browse/HBASE-7387
>             Project: HBase
>          Issue Type: Improvement
>          Components: regionserver
>    Affects Versions: 0.96.0
>            Reporter: Raymond Liu
>            Assignee: Raymond Liu
>            Priority: Minor
>             Fix For: 0.96.0
>
>         Attachments: HBASE_7387_v2.patch, StoreScanner.patch
>
>
> StoreScanner can be replaced by preStoreScannerOpen hook with CP. In order to 
> reuse most of the logic in current StoreScanner, subclass it might be the 
> best approaching. Thus a lot of private member need to be changed from 
> private to protected.
> At present, in order to to implement a custom storescanner for dot 
> (HBASE-6805), only a few of the private member need to be changed as in the 
> attached storescanner.patch, while should we change all the reasonable field 
> from private to protected as in HBASE-7387-v?.patch

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