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

Add normalization support to shell

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.2
    • 1.2.0, 1.3.0, 2.0.0
    • Balancer, shell
    • None
    • Hide
      This patch adds shell support for region normalizer (see HBASE-13103).

      3 commands have been added to hbase shell 'tools' command group (modeled on how the balancer works):

       - 'normalizer_enabled' checks whether region normalizer is turned on
       - 'normalizer_switch' allows user to turn normalizer on and off
       - 'normalize' runs region normalizer if it's turned on.

      Also 'alter' command has been extended to allow user to enable/disable region normalization per table (disabled by default). Use it as

      alter 'testtable', {NORMALIZATION_MODE => 'true'}

      Here is the help for the normalize command:

      {code}
      hbase(main):008:0> help 'normalize'
      Trigger region normalizer for all tables which have NORMALIZATION_MODE flag set. Returns true
       if normalizer ran successfully, false otherwise. Note that this command has no effect
       if region normalizer is disabled (make sure it's turned on using 'normalizer_switch' command).

       Examples:

         hbase> normalize
      {code}
      Show
      This patch adds shell support for region normalizer (see HBASE-13103 ). 3 commands have been added to hbase shell 'tools' command group (modeled on how the balancer works):  - 'normalizer_enabled' checks whether region normalizer is turned on  - 'normalizer_switch' allows user to turn normalizer on and off  - 'normalize' runs region normalizer if it's turned on. Also 'alter' command has been extended to allow user to enable/disable region normalization per table (disabled by default). Use it as alter 'testtable', {NORMALIZATION_MODE => 'true'} Here is the help for the normalize command: {code} hbase(main):008:0> help 'normalize' Trigger region normalizer for all tables which have NORMALIZATION_MODE flag set. Returns true  if normalizer ran successfully, false otherwise. Note that this command has no effect  if region normalizer is disabled (make sure it's turned on using 'normalizer_switch' command).  Examples:    hbase> normalize {code}

    Description

      https://issues.apache.org/jira/browse/HBASE-13103 adds support for setting a normalization flag per HTableDescriptor, along with the server side chore to do the work.

      What is lacking is to easily set this from the shell, right now you need to use the Java API to modify the descriptor. This issue is to add the flag as a known attribute key and/or other means to toggle this per table.

      Attachments

        1. HBASE-14367.patch
          289 kB
          Mikhail Antonov
        2. HBASE-14367-branch-1.2.v1.patch
          289 kB
          Mikhail Antonov
        3. HBASE-14367-branch-1.2.v2.patch
          289 kB
          Mikhail Antonov
        4. HBASE-14367-branch-1.2.v3.patch
          292 kB
          Mikhail Antonov
        5. HBASE-14367-branch-1.v1.patch
          303 kB
          Mikhail Antonov
        6. HBASE-14367-v1.patch
          305 kB
          Mikhail Antonov

        Issue Links

          Activity

            People

              mantonov Mikhail Antonov
              larsgeorge Lars George
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: