Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D10DF104C6 for ; Fri, 7 Feb 2014 19:05:25 +0000 (UTC) Received: (qmail 31114 invoked by uid 500); 7 Feb 2014 19:05:22 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 31053 invoked by uid 500); 7 Feb 2014 19:05:21 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 31031 invoked by uid 99); 7 Feb 2014 19:05:20 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Feb 2014 19:05:20 +0000 Date: Fri, 7 Feb 2014 19:05:20 +0000 (UTC) From: "Sergey Shelukhin (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-10479) HConnection interface is public but is used internally, and contains a bunch of methods MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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 prefetch? 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 that? > 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 (v6.1.5#6160)