Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-11879

Change TableInputFormatBase to take interface arguments

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.99.1
    • None
    • None
    • Reviewed

    Description

      As part of the ongoing interface abstraction work, I'm now investigating TableInputFormatBase, which has two methods that break encapsulation:

      protected HTable getHTable();
      protected void setHTable(HTable table);
      

      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:

      protected Table getTable();
      protected void setTable(Table table);
      protected RegionLocator getRegionLocator();
      protected void setRegionLocator(RegionLocator regionLocator);
      

      Since users will frequently call setTable and setRegionLocator together, it probably also makes sense to add the following convenience method:

      protected void setTableAndRegionLocator(Table table, RegionLocator regionLocator);
      

      Attachments

        1. 11879v4.txt
          14 kB
          Michael Stack
        2. HBASE-11879_v3.patch
          14 kB
          Solomon Duskis
        3. HBASE-11879_v2.patch
          15 kB
          Solomon Duskis
        4. HBASE_11879_v1.patch
          15 kB
          Solomon Duskis
        5. HBASE_11879.patch
          24 kB
          Solomon Duskis

        Issue Links

          Activity

            People

              sduskis Solomon Duskis
              carterpage Carter
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: