[ 
https://issues.apache.org/jira/browse/HBASE-2313?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alexey Kovyrin updated HBASE-2313:
----------------------------------

    Attachment: HBASE-2313.patch

Changed the way we handle exceptions in the shell by adding so called debug 
mode. By default debug mode is OFF which means that all errors will be 
displayed as one line comment:
{quote}
hbase(main):001:0> scan 'fooooo'
    
ERROR: Unknown table fooooo!
{quote}

When debug mode is ON, all errors would have a full backtrace displayed next to 
them:

{quote}
hbase(main):003:0> scan 'fooooo'
    
ERROR: Unknown table fooooo!
Backtrace: 
/Users/scoundrel/work/git/hbase/bin/../bin/../core/src/main/ruby/shell/commands.rb:46:in
 `check_table'
           
/Users/scoundrel/work/git/hbase/bin/../bin/../core/src/main/ruby/shell/commands/scan.rb:26:in
 `command'
           
/Users/scoundrel/work/git/hbase/bin/../bin/../core/src/main/ruby/shell/commands.rb:11:in
 `command_safe'
               
/Users/scoundrel/work/git/hbase/bin/../bin/../core/src/main/ruby/shell.rb:84:in 
`command'
               (eval):2:in `scan'
               (hbase):4:in `irb_binding'
{quote}

To manage debug mode I've added two additional shell commands: debug and debug?:

{quote}
hbase(main):005:0> debug?
Debug mode is OFF

hbase(main):006:0> debug
Debug mode is ON

hbase(main):007:0> debug
Debug mode is OFF
{quote}

Additional change in this patch - now we check if a table exists before doing 
any operations on it.


> Nit-pick about hbase-2279 shell fixup, if you do get with non-existant column 
> family, throws lots of exceptions
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-2313
>                 URL: https://issues.apache.org/jira/browse/HBASE-2313
>             Project: Hadoop HBase
>          Issue Type: Bug
>    Affects Versions: 0.21.0
>            Reporter: stack
>            Assignee: Alexey Kovyrin
>             Fix For: 0.21.0
>
>         Attachments: HBASE-2313.patch
>
>
> I believe the old shell would complain once only.. .or at least, it didn't 
> print out so many fat exceptions.  New fixedup shell will retry a bunch of 
> times with a fat stack trace each time.  Assigning Alexey 'cos he asked for 
> it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to