HBase
  1. HBase
  2. HBASE-10653

Incorrect table status in HBase shell Describe

    Details

    • Type: Bug Bug
    • Status: Patch Available
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.94.17
    • Fix Version/s: 0.98.0
    • Component/s: shell
    • Tags:
      HBase Shell

      Description

      Describe output of table which is disabled shows as enabled.

      1. HBASE-10653.2.patch
        16 kB
        Rekha Joshi
      2. HBASE-10653.1.patch
        0.7 kB
        Rekha Joshi

        Activity

        Hide
        Nick Dimiduk added a comment -

        Can you provide any context for this issue? Sequence of actions performed (failed or otherwise) in order to reproduce, relevant logs from master/RS, etc. There's not much to go on here.

        Show
        Nick Dimiduk added a comment - Can you provide any context for this issue? Sequence of actions performed (failed or otherwise) in order to reproduce, relevant logs from master/RS, etc. There's not much to go on here.
        Hide
        Biju Nair added a comment -

        Steps:
        1) Create table through HBase shell
        2) describe 'table-name'
        3) disable 'table-name'
        4) describe 'table-name'
        The output from steps 2 & 4 shows the table as ENABLED. Following is a sample output for a disabled table. Hope this helps.

        DESCRIPTION ENABLED
        'TestTable',

        {NAME => 'info', DATA_BLOCK_ENCODING => 'NONE', BLOOMF false ILTER => 'ROW', REPLICATION_SCOPE => '0', VERSIONS => '1', COMPRESS ION => 'SNAPPY', MIN_VERSIONS => '0', TTL => '2147483647', KEEP_DEL ETED_CELLS => 'false', BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'true'}

        1 row(s) in 1.4220 seconds

        Show
        Biju Nair added a comment - Steps: 1) Create table through HBase shell 2) describe 'table-name' 3) disable 'table-name' 4) describe 'table-name' The output from steps 2 & 4 shows the table as ENABLED. Following is a sample output for a disabled table. Hope this helps. DESCRIPTION ENABLED 'TestTable', {NAME => 'info', DATA_BLOCK_ENCODING => 'NONE', BLOOMF false ILTER => 'ROW', REPLICATION_SCOPE => '0', VERSIONS => '1', COMPRESS ION => 'SNAPPY', MIN_VERSIONS => '0', TTL => '2147483647', KEEP_DEL ETED_CELLS => 'false', BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'true'} 1 row(s) in 1.4220 seconds
        Hide
        Aleksandr Shulman added a comment -

        The formatting is a bit confusing, but it does appear that the table is
        disabled:
        'ENABLED' is just the name of the attribute. Below, it says 'false', right
        under that heading.

        DESCRIPTION
        ENABLED
        'TestTable',

        {NAME => 'info', DATA_BLOCK_ENCODING => 'NONE', BLOOMF *false* ILTER => 'ROW', REPLICATION_SCOPE => '0', VERSIONS => '1', COMPRESS ION => 'SNAPPY', MIN_VERSIONS => '0', TTL => '2147483647', KEEP_DEL ETED_CELLS => 'false', BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'true'}

        1 row(s) in 1.4220 seconds

        This might be a usability concern though, and maybe it's worth exploring a
        clearer formatting.


        Best Regards,

        Aleks Shulman
        847.814.5804
        Cloudera

        Show
        Aleksandr Shulman added a comment - The formatting is a bit confusing, but it does appear that the table is disabled: 'ENABLED' is just the name of the attribute. Below, it says 'false', right under that heading. DESCRIPTION ENABLED 'TestTable', {NAME => 'info', DATA_BLOCK_ENCODING => 'NONE', BLOOMF *false* ILTER => 'ROW', REPLICATION_SCOPE => '0', VERSIONS => '1', COMPRESS ION => 'SNAPPY', MIN_VERSIONS => '0', TTL => '2147483647', KEEP_DEL ETED_CELLS => 'false', BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'true'} 1 row(s) in 1.4220 seconds This might be a usability concern though, and maybe it's worth exploring a clearer formatting. – Best Regards, Aleks Shulman 847.814.5804 Cloudera
        Hide
        Aleksandr Shulman added a comment -

        To clarify, the 'false' ended up here:

        BLOOMF *false* ILTER 
        Show
        Aleksandr Shulman added a comment - To clarify, the 'false' ended up here: BLOOMF * false * ILTER
        Hide
        Jonathan Hsieh added a comment -

        I"ve been annoyed by the formatter for columnar data in the shell for a while – we need to add a mode where it is not reformatted.

        Show
        Jonathan Hsieh added a comment - I"ve been annoyed by the formatter for columnar data in the shell for a while – we need to add a mode where it is not reformatted.
        Hide
        Rekha Joshi added a comment -

        Attached quick patch to have ENABLED set in separate line to avoid confusion.

        Show
        Rekha Joshi added a comment - Attached quick patch to have ENABLED set in separate line to avoid confusion.
        Hide
        Rekha Joshi added a comment -

        Verified and enabled(true,here) is not clear.

        describe 'ripple_dnb_test'
        DESCRIPTION                                                                                                                    ENABLED                                                           
         {NAME => 'ripple_dnb_test', FAMILIES => [{NAME => 'master', DATA_BLOCK_ENCODING => 'NONE', BLOOMFILTER => 'NONE', REPLICATION true                                                              
         _SCOPE => '0', VERSIONS => '3', COMPRESSION => 'NONE', MIN_VERSIONS => '0', TTL => '2147483647', KEEP_DELETED_CELLS => 'false                                                                   
         ', BLOCKSIZE => '65536', IN_MEMORY => 'false', ENCODE_ON_DISK => 'true', BLOCKCACHE => 'true'}]}                                                                                                
        1 row(s) in 0.2660 seconds
        

        Attached quick patch to have ENABLED set in separate line to avoid confusion.

        Show
        Rekha Joshi added a comment - Verified and enabled(true,here) is not clear. describe 'ripple_dnb_test' DESCRIPTION ENABLED {NAME => 'ripple_dnb_test', FAMILIES => [{NAME => 'master', DATA_BLOCK_ENCODING => 'NONE', BLOOMFILTER => 'NONE', REPLICATION true _SCOPE => '0', VERSIONS => '3', COMPRESSION => 'NONE', MIN_VERSIONS => '0', TTL => '2147483647', KEEP_DELETED_CELLS => 'false ', BLOCKSIZE => '65536', IN_MEMORY => 'false', ENCODE_ON_DISK => 'true', BLOCKCACHE => 'true'}]} 1 row(s) in 0.2660 seconds Attached quick patch to have ENABLED set in separate line to avoid confusion.
        Hide
        Rekha Joshi added a comment -

        Towards format changes, think we may introduce –noformat option on shell (hbase> noformat <RETURN> or ./bin/hbase shell –noformat option)

        1.Towards that approach, stipulate changes mainly in shell.rb/or couple files and passed effect.But more testing needed to check if –noformat has no adverse effect on multiple cmds.
        2.Or Should we think to have options like RDBMS(SQLWorld), provide user to set column format, line size etc (sql>column column_name format a30 ; sql>set line size 300, etc)

        What do you think?

        Show
        Rekha Joshi added a comment - Towards format changes, think we may introduce –noformat option on shell (hbase> noformat <RETURN> or ./bin/hbase shell –noformat option) 1.Towards that approach, stipulate changes mainly in shell.rb/or couple files and passed effect.But more testing needed to check if –noformat has no adverse effect on multiple cmds. 2.Or Should we think to have options like RDBMS(SQLWorld), provide user to set column format, line size etc (sql>column column_name format a30 ; sql>set line size 300, etc) What do you think?
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12632815/HBASE-10653.1.patch
        against trunk revision .
        ATTACHMENT ID: 12632815

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/8902//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12632815/HBASE-10653.1.patch against trunk revision . ATTACHMENT ID: 12632815 +1 @author . The patch does not contain any @author tags. -1 tests included . The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. -1 patch . The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/8902//console This message is automatically generated.
        Hide
        stack added a comment -

        This is a pain. The formatter is a poor imitation of 'real' terminal sql clients (IIRC, I did first version – hence 'poor'). Pity we couldn't use something like sqlline. Other quality text-based console implementations that I found back then when messing with this had incompatible licenses.

        The patch is a little orthodox compared to how we format other stuff in shell but this case is awkward with wide description and narrow enabled.

        Is it possible to say hbase> describe "tableA", "tableB"

        ... i.e. get the output of multiple tables at once? If so, this patch won't work for that case. Otherwise, this patch might be a decent enough compromise for now ... till we have a redo of the shell.

        Show
        stack added a comment - This is a pain. The formatter is a poor imitation of 'real' terminal sql clients (IIRC, I did first version – hence 'poor'). Pity we couldn't use something like sqlline. Other quality text-based console implementations that I found back then when messing with this had incompatible licenses. The patch is a little orthodox compared to how we format other stuff in shell but this case is awkward with wide description and narrow enabled. Is it possible to say hbase> describe "tableA", "tableB" ... i.e. get the output of multiple tables at once? If so, this patch won't work for that case. Otherwise, this patch might be a decent enough compromise for now ... till we have a redo of the shell.
        Show
        stack added a comment - See, stuff like https://code.google.com/p/lanterna/ , http://sourceforge.net/projects/javacurses/ , http://www.pitman.co.za/projects/charva/Licence.html , and https://code.google.com/p/j-text-utils/ are GPL (and most are just jni wrappers around ncurses) Might be better to go ruby route? http://tableprintgem.com/ https://github.com/visionmedia/terminal-table
        Hide
        Rekha Joshi added a comment -

        Sure Stack.Good points.I will check output with table_print/terminal_table and update.

        Please note playing with the latest and greatest of OSX Mavericks 10.9.1, my m/c has all crashed
        into re-imaging(this time with 10.9.2 ) will re-setup my box and get the patch soon.Thanks!

        Show
        Rekha Joshi added a comment - Sure Stack.Good points.I will check output with table_print/terminal_table and update. Please note playing with the latest and greatest of OSX Mavericks 10.9.1, my m/c has all crashed into re-imaging(this time with 10.9.2 ) will re-setup my box and get the patch soon.Thanks!
        Hide
        Rekha Joshi added a comment -

        Attached patch with suggestion form stack.Thanks

        Show
        Rekha Joshi added a comment - Attached patch with suggestion form stack.Thanks
        Hide
        Rekha Joshi added a comment -

        Attached patch using terminal table/suggestion form Stack.Thanks

        Show
        Rekha Joshi added a comment - Attached patch using terminal table/suggestion form Stack.Thanks
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12642218/HBASE-10653.2.patch
        against trunk revision .
        ATTACHMENT ID: 12642218

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/9424//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12642218/HBASE-10653.2.patch against trunk revision . ATTACHMENT ID: 12642218 +1 @author . The patch does not contain any @author tags. -1 tests included . The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. -1 patch . The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/9424//console This message is automatically generated.

          People

          • Assignee:
            Rekha Joshi
            Reporter:
            Biju Nair
          • Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

            • Created:
              Updated:

              Development