[ 
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

Reply via email to