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 4C1761194D for ; Wed, 3 Sep 2014 00:03:54 +0000 (UTC) Received: (qmail 10076 invoked by uid 500); 3 Sep 2014 00:03:52 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 10041 invoked by uid 500); 3 Sep 2014 00:03:52 -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 9903 invoked by uid 99); 3 Sep 2014 00:03:52 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Sep 2014 00:03:52 +0000 Date: Wed, 3 Sep 2014 00:03:52 +0000 (UTC) From: "Enis Soztutar (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-11879) Change TableInputFormatBase to take interface arguments 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-11879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14119002#comment-14119002 ] Enis Soztutar commented on HBASE-11879: --------------------------------------- I like option 2. > Change TableInputFormatBase to take interface arguments > ------------------------------------------------------- > > Key: HBASE-11879 > URL: https://issues.apache.org/jira/browse/HBASE-11879 > Project: HBase > Issue Type: Improvement > Reporter: Carter > Assignee: Carter > > As part of the ongoing interface abstraction work, I'm now investigating {{TableInputFormatBase}}, which has two methods that break encapsulation: > {code} > protected HTable getHTable(); > protected void setHTable(HTable table); > {code} > While these are protected methods, the base @InterfaceAudience.Public is abstract, meaning that it supports extension by user code. > I propose deprecating these two methods and replacing them with these four, once the Table interface is merged: > {code} > protected Table getTable(); > protected void setTable(Table table); > protected RegionLocator getRegionLocator(); > protected void setRegionLocator(RegionLocator regionLocator); > {code} > Since users will frequently call {{setTable}} and {{setRegionLocator}} together, it probably also makes sense to add the following convenience method: > {code} > protected void setTableAndRegionLocator(Table table, RegionLocator regionLocator); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)