HBase
  1. HBase
  2. HBASE-5581

Creating a table with invalid syntax does not give an error message when it fails

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.94.0, 0.95.0
    • Component/s: shell
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Creating a table with invalid syntax does not give an error message when it fails. In this case, it doesn't actually create the CF requested, but doesn't give any indication to the user that it failed.

      create 'test',

      {NAME => 'test', VERSIONS => 1, BLOCKCACHE => true, NUMREGIONS => 20, SPLITALGO => "HexStringSplit", COMPRESSION => 'LZO', BLOOMFILTER => 'ROW'}

      0 row(s) in 3.0930 seconds

      hbase(main):002:0> describe 'test'
      DESCRIPTION ENABLED

      {NAME => 'test', FAMILIES => []}

      true
      1 row(s) in 0.1430 seconds


      Putting

      {NUMREGIONS => 20, SPLITALGO => "HexStringSplit"} into a separate stanza works fine, so the feature is fine.

      create 'test', {NAME => 'test', VERSIONS => 1, BLOCKCACHE => true, COMPRESSION => 'LZO', BLOOMFILTER => 'ROW'}, {NUMREGIONS => 20, SPLITALGO => "HexStringSplit"}

      0 row(s) in 2.7860 seconds

      hbase(main):002:0> describe 'test'
      DESCRIPTION ENABLED
      {NAME => 'test', FAMILIES => [

      {NAME => 'test', DATA_BLOCK_ENCODING => 'NONE', true BLOOMFILTER => 'ROW', REPLICATION_SCOPE => '0', COMPRESSION => 'LZO', VERSIONS => '1', TTL => '2147483647', BLOCKSIZE => '65536', BLOOMFILTER_ERRORRATE => ' 0.01', ENCODE_ON_DISK => 'true', IN_MEMORY => 'false', BLOCKCACHE => 'true'}

      ]}


      We should throw an error if we can't create the CF so it's clear to the user.

      1. ASF.LICENSE.NOT.GRANTED--D2343.1.patch
        0.9 kB
        Phabricator
      2. 5581trunk.patch
        0.8 kB
        stack

        Activity

        Hide
        Phabricator added a comment -

        binujohn7 requested code review of "[jira] HBASE-5581 [89-fb] Creating a table with invalid syntax does not give an error message when it fails".
        Reviewers: JIRA, Kannan

        Creating a table with invalid syntax does not give an error message when it fails. In this case, it doesn't actually create the CF requested, but doesn't give any indication to the user that it failed. Throw an error in case of invalid table creation syntax.

        Fix a typo in the error message when NUMREGIONS <= 1.

        TEST PLAN
        Try to create a table with an invalid command as follows -
        create 'test',

        {NAME => 'test', VERSIONS => 1, BLOCKCACHE => true, NUMREGIONS => 20, SPLITALGO => "HexStringSplit", COMPRESSION => 'LZO', BLOOMFILTER => 'ROW'}

        This should report an error.

        Verify that the table is created correctly when the column family configuration is specified in a separate clause as shown below

        create 'test',

        {NAME => 'test', VERSIONS => 1, BLOCKCACHE => true, COMPRESSION => 'LZO', BLOOMFILTER => 'ROW'}

        ,

        {NUMREGIONS => 20, SPLITALGO => "HexStringSplit"}

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

        AFFECTED FILES
        src/main/ruby/hbase/admin.rb

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

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

        Tip: use the X-Herald-Rules header to filter Herald messages in your client.

        Show
        Phabricator added a comment - binujohn7 requested code review of " [jira] HBASE-5581 [89-fb] Creating a table with invalid syntax does not give an error message when it fails". Reviewers: JIRA, Kannan Creating a table with invalid syntax does not give an error message when it fails. In this case, it doesn't actually create the CF requested, but doesn't give any indication to the user that it failed. Throw an error in case of invalid table creation syntax. Fix a typo in the error message when NUMREGIONS <= 1. TEST PLAN Try to create a table with an invalid command as follows - create 'test', {NAME => 'test', VERSIONS => 1, BLOCKCACHE => true, NUMREGIONS => 20, SPLITALGO => "HexStringSplit", COMPRESSION => 'LZO', BLOOMFILTER => 'ROW'} This should report an error. Verify that the table is created correctly when the column family configuration is specified in a separate clause as shown below create 'test', {NAME => 'test', VERSIONS => 1, BLOCKCACHE => true, COMPRESSION => 'LZO', BLOOMFILTER => 'ROW'} , {NUMREGIONS => 20, SPLITALGO => "HexStringSplit"} REVISION DETAIL https://reviews.facebook.net/D2343 AFFECTED FILES src/main/ruby/hbase/admin.rb MANAGE HERALD DIFFERENTIAL RULES https://reviews.facebook.net/herald/view/differential/ WHY DID I GET THIS EMAIL? https://reviews.facebook.net/herald/transcript/5193/ Tip: use the X-Herald-Rules header to filter Herald messages in your client.
        Hide
        Phabricator added a comment -

        Kannan has accepted the revision "[jira] HBASE-5581 [89-fb] Creating a table with invalid syntax does not give an error message when it fails".

        Thank! Lgtm...

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

        BRANCH
        table_create_error

        Show
        Phabricator added a comment - Kannan has accepted the revision " [jira] HBASE-5581 [89-fb] Creating a table with invalid syntax does not give an error message when it fails". Thank! Lgtm... REVISION DETAIL https://reviews.facebook.net/D2343 BRANCH table_create_error
        Hide
        Mikhail Bautin added a comment -

        Is this OK to commit to trunk? Could someone +1? Thanks!

        Show
        Mikhail Bautin added a comment - Is this OK to commit to trunk? Could someone +1? Thanks!
        Hide
        Lars Hofhansl added a comment -

        +1

        Show
        Lars Hofhansl added a comment - +1
        Hide
        Lars Hofhansl added a comment -

        Small patch, let's do that in 0.94 too.

        Show
        Lars Hofhansl added a comment - Small patch, let's do that in 0.94 too.
        Hide
        stack added a comment -

        What I committed to trunk and 0.94. Its a one-liner only.

        Show
        stack added a comment - What I committed to trunk and 0.94. Its a one-liner only.
        Hide
        stack added a comment -

        Thanks for the patch Binu. Committed trunk and 0.94.

        Show
        stack added a comment - Thanks for the patch Binu. Committed trunk and 0.94.
        Hide
        Hudson added a comment -

        Integrated in HBase-0.94 #34 (See https://builds.apache.org/job/HBase-0.94/34/)
        HBASE-5581 Creating a table with invalid syntax does not give an error message when it fails (Revision 1301690)

        Result = SUCCESS
        stack :
        Files :

        • /hbase/branches/0.94/src/main/ruby/hbase/admin.rb
        Show
        Hudson added a comment - Integrated in HBase-0.94 #34 (See https://builds.apache.org/job/HBase-0.94/34/ ) HBASE-5581 Creating a table with invalid syntax does not give an error message when it fails (Revision 1301690) Result = SUCCESS stack : Files : /hbase/branches/0.94/src/main/ruby/hbase/admin.rb
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK #2685 (See https://builds.apache.org/job/HBase-TRUNK/2685/)
        HBASE-5581 Creating a table with invalid syntax does not give an error message when it fails (Revision 1301688)

        Result = SUCCESS
        stack :
        Files :

        • /hbase/trunk/src/main/ruby/hbase/admin.rb
        Show
        Hudson added a comment - Integrated in HBase-TRUNK #2685 (See https://builds.apache.org/job/HBase-TRUNK/2685/ ) HBASE-5581 Creating a table with invalid syntax does not give an error message when it fails (Revision 1301688) Result = SUCCESS stack : Files : /hbase/trunk/src/main/ruby/hbase/admin.rb
        Hide
        Mikhail Bautin added a comment -

        Binu: thanks for the patch!
        Stack: thanks for committing!

        Show
        Mikhail Bautin added a comment - Binu: thanks for the patch! Stack: thanks for committing!
        Hide
        Phabricator added a comment -

        mbautin has committed the revision "[jira] HBASE-5581 [89-fb] Creating a table with invalid syntax does not give an error message when it fails".

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

        COMMIT
        https://reviews.facebook.net/rHBASEEIGHTNINEFBBRANCH1301789

        Show
        Phabricator added a comment - mbautin has committed the revision " [jira] HBASE-5581 [89-fb] Creating a table with invalid syntax does not give an error message when it fails". REVISION DETAIL https://reviews.facebook.net/D2343 COMMIT https://reviews.facebook.net/rHBASEEIGHTNINEFBBRANCH1301789
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK-security #140 (See https://builds.apache.org/job/HBase-TRUNK-security/140/)
        HBASE-5581 Creating a table with invalid syntax does not give an error message when it fails (Revision 1301688)

        Result = SUCCESS
        stack :
        Files :

        • /hbase/trunk/src/main/ruby/hbase/admin.rb
        Show
        Hudson added a comment - Integrated in HBase-TRUNK-security #140 (See https://builds.apache.org/job/HBase-TRUNK-security/140/ ) HBASE-5581 Creating a table with invalid syntax does not give an error message when it fails (Revision 1301688) Result = SUCCESS stack : Files : /hbase/trunk/src/main/ruby/hbase/admin.rb

          People

          • Assignee:
            Unassigned
            Reporter:
            Binu John
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development