hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Shelukhin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-10479) HConnection interface is public but is used internally, and contains a bunch of methods
Date Fri, 07 Feb 2014 19:05:20 GMT

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

Sergey Shelukhin commented on HBASE-10479:

stack: HConnection is actually "Cluster", user-facing, but one cannot simply rename it. I
guess I can call a new one ClusterConnectionInternal?
I want to keep internal in the name so it would be obvious.

bq. boolean isTableAvailable(TableName tableName, byte[][] splitKeys) throws
This seems valid user method to me.

bq.  HRegionLocation getRegionLocation(TableName tableName, byte [] row,
Already deprecated... note that I am deprecating methods, not removing them.

bq. I am not sure about setRegionCachePrefetch() and friends. Do people disable region cache
Seems like explicitly user-facing method to me. Whether it's needed is another question.

bq. While we are at it, lets change the public fields (public static fields) in HC and HCM
as well.
There are constants.

bq. Can we also move this to HConnectionInternal : HCM.injectNonceGeneratorForTesting()
HCI is an interface; I don't think we want to add that method there and have it propagate
to all implementations.

bq. HCM.execute() is marked private with annotation. But we still have the same problem in
HCM that it contains both public intended methods (createConnection()) and private methods.
Can we reduce the visibility or make a HCMInternal or smt like that? Same for HCM.findException()
and HCM.setServerSideHConnectionRetries()
HCM was kind of out of the scope of this patch. We could make a pass-thru from HCM to HCMInternal,
because it's static it's not going to be pretty.
All the logic will move to ...Internal, and HCM will just call the internal. You want to do

> HConnection interface is public but is used internally, and contains a bunch of methods
> ---------------------------------------------------------------------------------------
>                 Key: HBASE-10479
>                 URL: https://issues.apache.org/jira/browse/HBASE-10479
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Sergey Shelukhin
>            Assignee: Sergey Shelukhin
>         Attachments: HBASE-10479.01.patch, HBASE-10479.02.patch, HBASE-10479.patch
> HConnection has too many methods for a public interface, and some of these should not
be public.
> It is used extensively for internal purposes, so we keep adding methods to it that may
not make sense for public interface.
> The idea is to create a separate internal interface inheriting HConnection, copy some
methods to it and deprecate them on HConnection. New methods for internal use would be added
to new interface; the deprecated methods would eventually be removed from public interface.

This message was sent by Atlassian JIRA

View raw message