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

Turn off command help that follows all errors in shell

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 3.0.0-alpha-1, 2.1.0
    • Component/s: shell
    • Labels:
      None
    • Hadoop Flags:
      Incompatible change
    • Release Note:
      Hide
      <!-- markdown -->
      The command help that followed all errors, before, is now no longer available. Erroneous command inputs would now just show error-texts followed by the shell command to try for seeing the help message. It looks like: For usage try 'help “create”’. Operators can copy-paste the command to get the help message.
      Show
      <!-- markdown --> The command help that followed all errors, before, is now no longer available. Erroneous command inputs would now just show error-texts followed by the shell command to try for seeing the help message. It looks like: For usage try 'help “create”’. Operators can copy-paste the command to get the help message.

      Description

      Right now if a shell command gives an error, any error, it then echos the command help. It makes it harder to see the actual error text and is annoying.

      example:

                                                                                                                                                                                             
      hbase(main):007:0> create 'test:a_table', 'family', { NUMREGIONS => 20, SPLITALGO => 'HexStringSplit'}
      
      ERROR: Unknown namespace test!
      
      Creates a table. Pass a table name, and a set of column family
      specifications (at least one), and, optionally, table configuration.
      Column specification can be a simple string (name), or a dictionary
      (dictionaries are described below in main help output), necessarily
      including NAME attribute.
      Examples:
      
      Create a table with namespace=ns1 and table qualifier=t1
        hbase> create 'ns1:t1', {NAME => 'f1', VERSIONS => 5}
      
      Create a table with namespace=default and table qualifier=t1
        hbase> create 't1', {NAME => 'f1'}, {NAME => 'f2'}, {NAME => 'f3'}
        hbase> # The above in shorthand would be the following:
        hbase> create 't1', 'f1', 'f2', 'f3'
        hbase> create 't1', {NAME => 'f1', VERSIONS => 1, TTL => 2592000, BLOCKCACHE => true}
        hbase> create 't1', {NAME => 'f1', CONFIGURATION => {'hbase.hstore.blockingStoreFiles' => '10'}}
        hbase> create 't1', {NAME => 'f1', IS_MOB => true, MOB_THRESHOLD => 1000000, MOB_COMPACT_PARTITION_POLICY => 'weekly'}
      
      Table configuration options can be put at the end.
      Examples:
      
        hbase> create 'ns1:t1', 'f1', SPLITS => ['10', '20', '30', '40']
        hbase> create 't1', 'f1', SPLITS => ['10', '20', '30', '40']
        hbase> create 't1', 'f1', SPLITS_FILE => 'splits.txt', OWNER => 'johndoe'
        hbase> create 't1', {NAME => 'f1', VERSIONS => 5}, METADATA => { 'mykey' => 'myvalue' }
        hbase> # Optionally pre-split the table into NUMREGIONS, using
        hbase> # SPLITALGO ("HexStringSplit", "UniformSplit" or classname)
        hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit'}
        hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit', REGION_REPLICATION => 2, CONFIGURATION => {'hbase.hregion.scan.loadColumnFamiliesOnDemand' => 'true'}}
        hbase> create 't1', {NAME => 'f1', DFS_REPLICATION => 1}
      
      You can also keep around a reference to the created table:
      
        hbase> t1 = create 't1', 'f1'
      
      Which gives you a reference to the table named 't1', on which you can then
      call methods.
      
      Took 0.0221 seconds                                                                                                                                                                                         
      hbase(main):008:0> create_namespace 'test'
      Took 0.2554 seconds                                                                                                                                                                                         
      hbase(main):009:0> create 'test:a_table', 'family', { NUMREGIONS => 20, SPLITALGO => 'HexStringSplit'}
      Created table test:a_table
      Took 1.2264 seconds                     
      

      I was trying to make a table in the test namespace before making the namespace. Much faster to recognize and move on when the error text isn't followed by 80x the text.

        Attachments

        1. hbase-20270.master.001.patch
          0.9 kB
          Sakthi
        2. hbase-20270.master.002.patch
          3 kB
          Sakthi
        3. hbase-20270.master.003.patch
          3 kB
          Sakthi
        4. hbase-20270.master.004.patch
          6 kB
          Sakthi
        5. hbase-20270.master.005.patch
          6 kB
          Sakthi
        6. hbase-20270.master.006.patch
          6 kB
          Sakthi

          Issue Links

            Activity

              People

              • Assignee:
                sakthi Sakthi
                Reporter:
                busbey Sean Busbey
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: