You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Solomon Duskis (JIRA)" <ji...@apache.org> on 2014/09/12 16:59:34 UTC

[jira] [Updated] (HBASE-11879) Change TableInputFormatBase to take interface arguments

     [ https://issues.apache.org/jira/browse/HBASE-11879?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Solomon Duskis updated HBASE-11879:
-----------------------------------
    Attachment: HBASE_11825.patch

Most of the work in this patch was from Enis's patch in HBASE-10602.  There were a few things that changed since April, so I did my best to make sure that differences between Enis's patch and the current master are resolved.  Given that this is my first patch, I'm pretty sure that I've missed something, but not sure what.

> 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
>         Attachments: HBASE_11825.patch
>
>
> 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)