[
https://issues.apache.org/jira/browse/HBASE-18825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16172965#comment-16172965
]
Duo Zhang commented on HBASE-18825:
-----------------------------------
[~stack] [~anoopsamjohn] I think we both agree that we need to purge
unnecessary methods from the CP interfaces right? I think the fastest way is to
use implementation classes in our own code and then remove unnecessary methods
in CP interfaces. Cast can not be fully eliminated as we do allow CP users use
the CP interface as an parameter but as long as CP users do not have a way to
construct it by themselves so it is safe to cast it to our implementation class?
Currently I do not have any tendency about whether we should use interfaces in
our own code( the IRSS in HBASE-18298?), but as long as the implementation
classes are marked as IA.Private, we are free to change it at any time. So I
think use implementation directly at this time is acceptable as it is the
fastest way? On the mock, yeah, if you want create a fully mocked class then
implement an interface is the most suitable way, but if you use mockito, it
does not make any difference whether you use an interface or not, mockito can
also mock a class.
Thanks.
> Use HStoreFile instead of StoreFile in our own code base and remove
> unnecessary methods in StoreFile interface
> --------------------------------------------------------------------------------------------------------------
>
> Key: HBASE-18825
> URL: https://issues.apache.org/jira/browse/HBASE-18825
> Project: HBase
> Issue Type: Sub-task
> Components: Coprocessors
> Reporter: Duo Zhang
> Assignee: Duo Zhang
> Fix For: 2.0.0-alpha-4
>
> Attachments: HBASE-18825.patch, HBASE-18825-v1.patch,
> HBASE-18825-v2.patch, HBASE-18825-v3.patch, HBASE-18825-v3.patch
>
>
> Use generic types to avoid too many casts.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)