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-18029) Backport HBASE-15296 to branch-1
Date Thu, 11 May 2017 10:00:11 GMT

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

Duo Zhang commented on HBASE-18029:

[~appy] I found it is really hard to keep compatibility here. The problem is that, StoreFile.Reader
is an instance of StoreFileReader, but StoreFileReader is not an instance of StoreFile.Reader.
The StoreFile is also marked as IA.LimitedPrivate(without IS annotation...) so if we want
to also keep compatibility then we must still declare the return value of createReader as
StoreFile.Reader. So here comes the problem, we add new methods in coprocessor which return
a StoreFileReader instead of StoreFile.Reader. These methods will be called in StoreFile.Reader.
If a user implements the new method and returns a StoreFileReader, how can we cast it to a
StoreFile.Reader instance?

And in fact, most of our IA.LimitPrivate(CP) classes are declared as IS.Evolving which means
it is allowed to break the compatibility between minor releases. But practically, it is not
a good idea to break compatibility between minor releases. It is a pain for the downstream
projects. I think we need to revisit the IS annotations.

And for the StoreFile related classes, I think a big problem is that, we expose a class instead
of an interface to CP, and the class is not only a data strcuture. I suggest that we make
interfaces for both StoreFile, StoreFileReader and StoreFileWriter if we really need to expose
them to CP. The work should be done before 2.0 release.

What do you think? [~stack] [~apurtell] [~lhofhansl].


> Backport HBASE-15296 to branch-1
> --------------------------------
>                 Key: HBASE-18029
>                 URL: https://issues.apache.org/jira/browse/HBASE-18029
>             Project: HBase
>          Issue Type: Improvement
>          Components: regionserver
>            Reporter: Duo Zhang

This message was sent by Atlassian JIRA

View raw message