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

Put HTable region methods in an interface

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.99.0
    • 0.99.0
    • None
    • None
    • Reviewed
    • Add a RegionLocator Interface. Encapsulates 'region' operations. Implemented by HTable and you can get one from an HConnection.

    Description

      Most of the HTable methods are now abstracted by HTableInterface, with the notable exception of the following methods that pertain to region metadata:

      HRegionLocation getRegionLocation(final String row)
      HRegionLocation getRegionLocation(final byte [] row)
      HRegionLocation getRegionLocation(final byte [] row, boolean reload)
      byte [][] getStartKeys()
      byte[][] getEndKeys()
      Pair<byte[][],byte[][]> getStartEndKeys()
      void clearRegionCache()
      

      and a default scope method which maybe should be bundled with the others:

      List<RegionLocations> listRegionLocations()
      

      Since the consensus seems to be that these would muddy HTableInterface with non-core functionality, where should it go? MapReduce looks up the region boundaries, so it needs to be exposed somewhere.

      Let me throw out a straw man to start the conversation. I propose:

      org.apache.hadoop.hbase.client.HRegionInterface
      

      Have HTable implement this interface. Also add these methods to HConnection:

      HRegionInterface getTableRegion(TableName tableName)
      HRegionInterface getTableRegion(TableName tableName, ExecutorService pool)
      

      stack, ndimiduk, enis, thoughts?

      Attachments

        1. HBASE_11657_v2.patch
          11 kB
          Carter
        2. HBASE_11657_v3.patch
          11 kB
          Michael Stack
        3. HBASE_11657_v3.patch
          11 kB
          Carter
        4. HBASE_11657_v4.patch
          14 kB
          Carter
        5. HBASE_11657_v5.patch
          14 kB
          Carter
        6. HBASE_11657_v6.patch
          14 kB
          Carter
        7. HBASE_11657.patch
          11 kB
          Carter

        Activity

          People

            carterpage Carter
            carterpage Carter
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: