HBase
  1. HBase
  2. HBASE-4628

Enhance Table Create Presplit Functionality within the HBase Shell

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.94.0
    • Component/s: None
    • Labels:
      None

      Description

      Currently, we allow the user to presplit in the HBase shell by explicitly listing the startkey of all the region shards that they want. Instead, we should provide the RegionSplitter functionality of choosing a split algorithm, followed by the number of splits that they want.

        Issue Links

          Activity

          Lars Hofhansl made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Kannan Muthukkaruppan made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 0.94.0 [ 12316419 ]
          Resolution Fixed [ 1 ]
          Nicolas Spiegelberg made changes -
          Comment [ nspiegelberg has requested changes to the revision "HBASE-4628 [jira] Enhance Table Create Presplit Functionality within the HBase Shell".

            was this change ported to trunk or just 89-fb? I cannot apply this patch on top of trunk.

          REVISION DETAIL
            https://reviews.facebook.net/D417
          ]
          Nicolas Spiegelberg made changes -
          Comment [ cgist has commented on the revision "HBASE-4628 [jira] Enhance Table Create Presplit Functionality within the HBase Shell".

            This diff was only intended for 89-fb. There is a separate diff for apache trunk D429.

          REVISION DETAIL
            https://reviews.facebook.net/D417
          ]
          Nicolas Spiegelberg made changes -
          Comment [ nspiegelberg has accepted the revision "HBASE-4628 [jira] Enhance Table Create Presplit Functionality within the HBase Shell".

            lgtm! Thanks for the contribution

          REVISION DETAIL
            https://reviews.facebook.net/D417
          ]
          Nicolas Spiegelberg made changes -
          Comment [ cgist requested code review of "HBASE-4628 [jira] Enhance Table Create Presplit Functionality within the HBase Shell".
          Reviewers: nspiegelberg, JIRA

            [89-fb] HBase shell can pre-split a new table at creation

            THis change adds optional arguments to the HBase shell's create command
            to split a tabel into a specified number of regions using a specified
            splitting algorithm as defined by RegionSplitter.

            Currently, we allow the user to presplit in the HBase shell by explicitly listing the startkey of all the region shards that they want. Instead, we should provide the RegionSplitter functionality of choosing a split algorithm, followed by the number of splits that they want.

          TEST PLAN
            Created tables with and without splits using the shell; also attempted
            to give incorrect arguments to shell create command.

          REVISION DETAIL
            https://reviews.facebook.net/D417

          AFFECTED FILES
            src/main/ruby/hbase.rb
            src/main/ruby/hbase/admin.rb
            src/main/ruby/shell/commands/create.rb

          MANAGE HERALD DIFFERENTIAL RULES
            https://reviews.facebook.net/herald/view/differential/

          WHY DID I GET THIS EMAIL?
            https://reviews.facebook.net/herald/transcript/837/

          Tip: use the X-Herald-Rules header to filter Herald messages in your client.
          ]
          Phabricator made changes -
          Attachment HBASE-4628.D417.2.patch [ 12503443 ]
          Phabricator made changes -
          Attachment HBASE-4628.D429.1.patch [ 12503417 ]
          Nicolas Spiegelberg made changes -
          Comment [ cgist has abandoned the revision "HBASE-4628 [jira] Enhance Table Create Presplit Functionality within the HBase Shell".

          REVISION DETAIL
            https://reviews.facebook.net/D411
          ]
          Nicolas Spiegelberg made changes -
          Comment [ nspiegelberg has commented on the revision "HBASE-4628 [jira] Enhance Table Create Presplit Functionality within the HBase Shell".

            Since this patch has been accepted into apache trunk, you don't need to make a patch for 89-fb. I'll automatically pull it in. We're just stalled on a previous commit. Go ahead and abandone this review.

          REVISION DETAIL
            https://reviews.facebook.net/D411
          ]
          Nicolas Spiegelberg made changes -
          Comment [ cgist requested code review of "HBASE-4628 [jira] Enhance Table Create Presplit Functionality within the HBase Shell".
          Reviewers: nspiegelberg, JIRA

            [89-fb] Ported RegionSplitter and TestRegionSplitter from trunk

            The RegionSplitter is useful for creating a table pre-split
            into many regions, including two different algorithms for splitting
            keys. This also includes the patch for HBASE-4627.

            Currently, we allow the user to presplit in the HBase shell by explicitly listing the startkey of all the region shards that they want. Instead, we should provide the RegionSplitter functionality of choosing a split algorithm, followed by the number of splits that they want.

          TEST PLAN
            The TestRegionSplitter test suite.

          REVISION DETAIL
            https://reviews.facebook.net/D411

          AFFECTED FILES
            src/main/java/org/apache/hadoop/hbase/util/Bytes.java
            src/main/java/org/apache/hadoop/hbase/util/RegionSplitter.java
            src/test/java/org/apache/hadoop/hbase/util/TestRegionSplitter.java

          MANAGE HERALD DIFFERENTIAL RULES
            https://reviews.facebook.net/herald/view/differential/

          WHY DID I GET THIS EMAIL?
            https://reviews.facebook.net/herald/transcript/831/

          Tip: use the X-Herald-Rules header to filter Herald messages in your client.
          ]
          Phabricator made changes -
          Attachment HBASE-4628.D417.1.patch [ 12503408 ]
          Phabricator made changes -
          Attachment HBASE-4628.D411.1.patch [ 12503404 ]
          Nicolas Spiegelberg made changes -
          Field Original Value New Value
          Link This issue relates to HBASE-4489 [ HBASE-4489 ]
          Nicolas Spiegelberg created issue -

            People

            • Assignee:
              Nicolas Spiegelberg
              Reporter:
              Nicolas Spiegelberg
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development