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

Support remove coprocessor by class name via alter table command

    XMLWordPrintableJSON

Details

    • Incompatible change, Reviewed
    • Hide
      This is an incompatible change for TableDescriptorBuilder#removeCoprocessor, if coprocessor does not exist and removeCoprocessor is being called, the new behavior is emitting an IllegalArgumentException instead of previously do nothing

      From now on, alter command introduces a new method table_remove_coprocessor that operator can remove table coprocessor by class name. Please see the usage as below

      * remove a single table coprocessor
      alter 't1', METHOD => 'table_remove_coprocessor', CLASSNAME => 'org.apache.hadoop.hbase.coprocessor.SimpleRegionObserver'

      * remove multiple coprocessors
      alter 't1', METHOD => 'table_remove_coprocessor', CLASSNAME => ['org.apache.hadoop.hbase.coprocessor.SimpleRegionObserver', 'org.apache.hadoop.hbase.coprocessor.Export']
      Show
      This is an incompatible change for TableDescriptorBuilder#removeCoprocessor, if coprocessor does not exist and removeCoprocessor is being called, the new behavior is emitting an IllegalArgumentException instead of previously do nothing From now on, alter command introduces a new method table_remove_coprocessor that operator can remove table coprocessor by class name. Please see the usage as below * remove a single table coprocessor alter 't1', METHOD => 'table_remove_coprocessor', CLASSNAME => 'org.apache.hadoop.hbase.coprocessor.SimpleRegionObserver' * remove multiple coprocessors alter 't1', METHOD => 'table_remove_coprocessor', CLASSNAME => ['org.apache.hadoop.hbase.coprocessor.SimpleRegionObserver', 'org.apache.hadoop.hbase.coprocessor.Export']
    • incompatible

    Description

      With the shell, when operator wants to remove a table coprocessor, the flow is to

      1. first use decs find the the mapping of coprocessor$# e.g. coprocessor$1, where # is the ordered number when the coprocessor was internally added to the table attribute
      2. issue table_att_unset with the target `coprocessor$#` that maps to a value that include the unique class name.

      This task is to simplify the flow if the operator know exactly the class name of the added coprocessor, and create a new sub-method to alter, such that operator can do it only with the class name.

      NOTE that this logic has been added behind the scenes at TableDescriptorBuilder#removeCoprocessor for removing `ConstraintProcessor` , and we are just exposing this logic with a new method to alter command.

      Attachments

        Issue Links

          Activity

            People

              taklwu Tak-Lon (Stephen) Wu
              taklwu Tak-Lon (Stephen) Wu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: