You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Oleg Zhurakousky (JIRA)" <ji...@apache.org> on 2012/11/20 16:08:58 UTC

[jira] [Created] (HBASE-7196) 'hbase shell status' throws exception when HBase is not running

Oleg Zhurakousky created HBASE-7196:
---------------------------------------

             Summary: 'hbase shell status' throws exception when HBase is not running
                 Key: HBASE-7196
                 URL: https://issues.apache.org/jira/browse/HBASE-7196
             Project: HBase
          Issue Type: Bug
    Affects Versions: 0.94.1
            Reporter: Oleg Zhurakousky


Its kind of a nuisance bug. One would assume that 'status' command should simply  return something along the lines of "HBase is not running"

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-7196) 'hbase shell status' throws exception when HBase is not running

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

Oleg Zhurakousky commented on HBASE-7196:
-----------------------------------------

Also
{code}
HBaseAdmin.isMasterRunning()
{code}
is throwing an exception if Master is not running. By definition boolean methods should never throw an exception, don't you agree?
                
> 'hbase shell status' throws exception when HBase is not running
> ---------------------------------------------------------------
>
>                 Key: HBASE-7196
>                 URL: https://issues.apache.org/jira/browse/HBASE-7196
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.94.1
>            Reporter: Oleg Zhurakousky
>
> Its kind of a nuisance bug. One would assume that 'status' command should simply  return something along the lines of "HBase is not running"

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-7196) 'hbase shell status' throws exception when HBase is not running

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

Oleg Zhurakousky commented on HBASE-7196:
-----------------------------------------

[~yuzhihong@gmail.com]
That is different. Delete may or may not succeed, while during the deletion the IOException may be thrown.
In the above case we have a method that by its name and thus definition suppose to return 'true' if Master is running and 'false' if Master is not running. And it doesn't do that. And as described above it its meaningless since it can never be called unless Master is running which is the prerequisite for creating HBaseAdmin instance. But once the instance is created its already implied that Master is running. Don't you agree?
                
> 'hbase shell status' throws exception when HBase is not running
> ---------------------------------------------------------------
>
>                 Key: HBASE-7196
>                 URL: https://issues.apache.org/jira/browse/HBASE-7196
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.94.1
>            Reporter: Oleg Zhurakousky
>
> Its kind of a nuisance bug. One would assume that 'status' command should simply  return something along the lines of "HBase is not running"

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-7196) 'hbase shell status' throws exception when HBase is not running

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

Ted Yu commented on HBASE-7196:
-------------------------------

Take a look at this method in FileSystem from hadoop:
{code}
  public abstract boolean delete(Path f) throws IOException;
{code}
                
> 'hbase shell status' throws exception when HBase is not running
> ---------------------------------------------------------------
>
>                 Key: HBASE-7196
>                 URL: https://issues.apache.org/jira/browse/HBASE-7196
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.94.1
>            Reporter: Oleg Zhurakousky
>
> Its kind of a nuisance bug. One would assume that 'status' command should simply  return something along the lines of "HBase is not running"

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-7196) 'hbase shell status' throws exception when HBase is not running

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

Ted Yu commented on HBASE-7196:
-------------------------------

I think the purpose of isMasterRunning() is for checking whether master is running after HBaseAdmin instance is successfully obtained.
                
> 'hbase shell status' throws exception when HBase is not running
> ---------------------------------------------------------------
>
>                 Key: HBASE-7196
>                 URL: https://issues.apache.org/jira/browse/HBASE-7196
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.94.1
>            Reporter: Oleg Zhurakousky
>
> Its kind of a nuisance bug. One would assume that 'status' command should simply  return something along the lines of "HBase is not running"

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-7196) 'hbase shell status' throws exception when HBase is not running

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

Oleg Zhurakousky commented on HBASE-7196:
-----------------------------------------

Different question.
Is there a reason why HBaseAdmin initializes itself in the constructor? It makes the above problem even more counter intuitive:
The javadoc for the constructor says:
{code}
@throws MasterNotRunningException if the master is not running
{code}
which means the _isMasterRunning()_ method is meaningless since you can never call it unless you have a valid instance of HBaseAdmin, but you'll never have one unless master is running.

Wouldn't it be better to always create HBaseAdmin and perform check for running master when necessary (of course without exception being thrown by the isMasterRunning() method)
                
> 'hbase shell status' throws exception when HBase is not running
> ---------------------------------------------------------------
>
>                 Key: HBASE-7196
>                 URL: https://issues.apache.org/jira/browse/HBASE-7196
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.94.1
>            Reporter: Oleg Zhurakousky
>
> Its kind of a nuisance bug. One would assume that 'status' command should simply  return something along the lines of "HBase is not running"

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-7196) 'hbase shell status' throws exception when HBase is not running

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

Oleg Zhurakousky commented on HBASE-7196:
-----------------------------------------

It would be great if that was the case, but unfortunately it is not and that is what I've been trying to explain.
Based on the current code HBaseAdmin instance can NOT be created unless master is running. 
                
> 'hbase shell status' throws exception when HBase is not running
> ---------------------------------------------------------------
>
>                 Key: HBASE-7196
>                 URL: https://issues.apache.org/jira/browse/HBASE-7196
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.94.1
>            Reporter: Oleg Zhurakousky
>
> Its kind of a nuisance bug. One would assume that 'status' command should simply  return something along the lines of "HBase is not running"

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira