hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Duo Zhang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-18037) Do not expose implementation classes to CP
Date Fri, 12 May 2017 02:22:04 GMT

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

Duo Zhang commented on HBASE-18037:
-----------------------------------

And another concern is that in the interfaces which are declared as IA.LimitedPrivate, the
return value or parameters may be declared as IA.Private.

For example, Store.getScanner will return a KeyValueScanner and KeyValueScanner is declared
as IA.Private, and one of the parameters of this method is ScanQueryMatcher, which is also
declared as IA.Private.

A possible explaination is that, you are free to hold a reference to a class which is declared
as IA.Private, but you can only use it as a monolithic object. You can use it as a parameter
to call  a method, or use it as a return value, but you should never try to call its methods
to change its state of do something else.

What do you think [~apurtell]? I think we need to explain this in our ref guide?

Thanks.

> Do not expose implementation classes to CP
> ------------------------------------------
>
>                 Key: HBASE-18037
>                 URL: https://issues.apache.org/jira/browse/HBASE-18037
>             Project: HBase
>          Issue Type: Umbrella
>          Components: Coprocessors
>    Affects Versions: 2.0.0
>            Reporter: Duo Zhang
>            Priority: Critical
>             Fix For: 2.0.0
>
>
> For example, StoreFile. Expose the implementation classes to CP will make it harder to
implement new features or improve the old implementation.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message