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

Add a new method preCreateTableRegionInfos for MasterObserver which allows CPs to modify the TableDescriptor

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-alpha-1, 2.2.0
    • Coprocessors
    • None
    • Reviewed
    • Hide
      Add a new method preCreateTableRegionInfos for MasterObserver, which will be called before creating region infos for the given table, before the preCreateTable method. It allows you to return a new TableDescritor to override the original one. Returns null or throws exception will stop the creation.
      Show
      Add a new method preCreateTableRegionInfos for MasterObserver, which will be called before creating region infos for the given table, before the preCreateTable method. It allows you to return a new TableDescritor to override the original one. Returns null or throws exception will stop the creation.

    Description

      Before 2.0, we will pass a HTableDescriptor and the CPs can modify the schema of a table, but now we will pass a TableDescriptor, which is immutable. I think it is correct to pass an immutable instance here, but we should have a return value for this method to allow CPs to return a new TableDescriptor.

      Attachments

        1. HBASE-21550.patch
          9 kB
          Duo Zhang

        Activity

          People

            zhangduo Duo Zhang
            zhangduo Duo Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: