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

Launching shell with long-form --debug fails

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.99.0, 0.98.5
    • Component/s: shell
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Even though the help says both 'd' and '-debug' are allowed, the shell fails if you use the long form.

      busbey2-MBA:hbase busbey$ bin/hbase shell --help
      Usage: shell [OPTIONS] [SCRIPTFILE [ARGUMENTS]]
      
       --format=OPTION                Formatter for outputting results.
                                      Valid options are: console, html.
                                      (Default: console)
      
       -d | --debug                   Set DEBUG log levels.
       -h | --help                    This help.
      busbey2-MBA:hbase busbey$ bin/hbase shell --debug
      Setting DEBUG log level...
      HBase Shell; enter 'help<RETURN>' for list of supported commands.
      Type "exit<RETURN>" to leave the HBase Shell
      Version 2.0.0-SNAPSHOT, r4d005b70a0fda4be5a8ead84ff5f54fceb3c637a, Mon Aug  4 14:17:22 CDT 2014
      
      IRB::UnrecognizedSwitch: Unrecognized switch: --debug
             Raise at file:/Users/busbey/.m2/repository/org/jruby/jruby-complete/1.6.8/jruby-complete-1.6.8.jar!/META-INF/jruby.home/lib/ruby/1.8/e2mmap.rb:167
              fail at file:/Users/busbey/.m2/repository/org/jruby/jruby-complete/1.6.8/jruby-complete-1.6.8.jar!/META-INF/jruby.home/lib/ruby/1.8/e2mmap.rb:95
        parse_opts at file:/Users/busbey/.m2/repository/org/jruby/jruby-complete/1.6.8/jruby-complete-1.6.8.jar!/META-INF/jruby.home/lib/ruby/1.8/irb/init.rb:194
             setup at file:/Users/busbey/.m2/repository/org/jruby/jruby-complete/1.6.8/jruby-complete-1.6.8.jar!/META-INF/jruby.home/lib/ruby/1.8/irb/init.rb:19
             start at /Users/busbey/projects/hbase/bin/../bin/hirb.rb:170
            (root) at /Users/busbey/projects/hbase/bin/../bin/hirb.rb:190
      busbey2-MBA:hbase busbey$ bin/hbase shell -d
      Setting DEBUG log level...
      HBase Shell; enter 'help<RETURN>' for list of supported commands.
      Type "exit<RETURN>" to leave the HBase Shell
      Version 2.0.0-SNAPSHOT, r4d005b70a0fda4be5a8ead84ff5f54fceb3c637a, Mon Aug  4 14:17:22 CDT 2014
      
      jruby-1.7.3 :001 > quit
      busbey2-MBA:hbase busbey$
      

      The problem is that we're sending the debug flag through to the IRB initialization as is, and it only recognizes the '-d' form.

        Attachments

        1. HBASE_11662-v1.patch
          0.9 kB
          Sean Busbey

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: