You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Alex Newman (Created) (JIRA)" <ji...@apache.org> on 2012/03/07 00:23:58 UTC

[jira] [Created] (HBASE-5534) HBase shell's return value is almost always 0

HBase shell's return value is almost always 0
---------------------------------------------

                 Key: HBASE-5534
                 URL: https://issues.apache.org/jira/browse/HBASE-5534
             Project: HBase
          Issue Type: Improvement
            Reporter: Alex Newman
            Assignee: Alex Newman


So I was trying to write some simple scripts to verify client connections to HBase using the shell and I noticed that the HBase shell always returns 0 even when it can't connect to an HBase server. I'm not sure if this is the best option. What would be neat is if you had some capability to run commands like

hbase shell --command='disable table;\ndrop table;' and it would error out if any of the commands fail to succeed. echo "disable table" | hbase shell could continue to work as it does now.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5534) HBase shell's return value is almost always 0

Posted by "Zhihong Yu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13279774#comment-13279774 ] 

Zhihong Yu commented on HBASE-5534:
-----------------------------------

I agree that this is a bug.
                
> HBase shell's return value is almost always 0
> ---------------------------------------------
>
>                 Key: HBASE-5534
>                 URL: https://issues.apache.org/jira/browse/HBASE-5534
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Alex Newman
>            Assignee: Alex Newman
>
> So I was trying to write some simple scripts to verify client connections to HBase using the shell and I noticed that the HBase shell always returns 0 even when it can't connect to an HBase server. I'm not sure if this is the best option. What would be neat is if you had some capability to run commands like
> hbase shell --command='disable table;\ndrop table;' and it would error out if any of the commands fail to succeed. echo "disable table" | hbase shell could continue to work as it does now.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (HBASE-5534) HBase shell's return value is almost always 0

Posted by "Alex Newman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5534?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Newman reassigned HBASE-5534:
----------------------------------

    Assignee:     (was: Alex Newman)
    
> HBase shell's return value is almost always 0
> ---------------------------------------------
>
>                 Key: HBASE-5534
>                 URL: https://issues.apache.org/jira/browse/HBASE-5534
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Alex Newman
>
> So I was trying to write some simple scripts to verify client connections to HBase using the shell and I noticed that the HBase shell always returns 0 even when it can't connect to an HBase server. I'm not sure if this is the best option. What would be neat is if you had some capability to run commands like
> hbase shell --command='disable table;\ndrop table;' and it would error out if any of the commands fail to succeed. echo "disable table" | hbase shell could continue to work as it does now.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5534) HBase shell's return value is almost always 0

Posted by "stack (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13223887#comment-13223887 ] 

stack commented on HBASE-5534:
------------------------------

You should be able to do:

{code}
hbase shell script.rb
{code}

... if thats of any help Alex (may still have the issue w/ exit code).
                
> HBase shell's return value is almost always 0
> ---------------------------------------------
>
>                 Key: HBASE-5534
>                 URL: https://issues.apache.org/jira/browse/HBASE-5534
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Alex Newman
>            Assignee: Alex Newman
>
> So I was trying to write some simple scripts to verify client connections to HBase using the shell and I noticed that the HBase shell always returns 0 even when it can't connect to an HBase server. I'm not sure if this is the best option. What would be neat is if you had some capability to run commands like
> hbase shell --command='disable table;\ndrop table;' and it would error out if any of the commands fail to succeed. echo "disable table" | hbase shell could continue to work as it does now.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5534) HBase shell's return value is almost always 0

Posted by "Oren Held (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13279720#comment-13279720 ] 

Oren Held commented on HBASE-5534:
----------------------------------

There should be one and only behavior for the CLI: return code != 0 if any error had occurred. That's the convention with all CLI tools on all platforms.
(I believe that creating a special --command flag, as suggested in the description, is redundant and confusing)


Imho, this issue should be referred to as a bug.

                
> HBase shell's return value is almost always 0
> ---------------------------------------------
>
>                 Key: HBASE-5534
>                 URL: https://issues.apache.org/jira/browse/HBASE-5534
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Alex Newman
>            Assignee: Alex Newman
>
> So I was trying to write some simple scripts to verify client connections to HBase using the shell and I noticed that the HBase shell always returns 0 even when it can't connect to an HBase server. I'm not sure if this is the best option. What would be neat is if you had some capability to run commands like
> hbase shell --command='disable table;\ndrop table;' and it would error out if any of the commands fail to succeed. echo "disable table" | hbase shell could continue to work as it does now.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira