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

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

Todd Lipcon, stack: I think delegation could help on reuse part, but when I 
want to replace say next() method with my own which have totally different 
approaching to process kv, I have to access those private members. This could 
not be done by wrapping and delegation. Unless public getter methods are 
provided for each of the private member. And since CP hook is provided for 
replace StoreScanner, shouldn't it be designed to be subclassable? otherwise 
any serious custom scanner will need to duplicate majority part of the code 
from StoreScanner to get wheels run.
                
> 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