[ 
https://issues.apache.org/jira/browse/HBASE-6273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13402064#comment-13402064
 ] 

nkeywal commented on HBASE-6273:
--------------------------------

+1 as well. Errors can be:
1) Can't connect to ZK -> Hence you can't get the master address. This is 
especially true in 0.96 as the connection to ZK is made on demand. I think we 
need to have/keep this as an exception
2) There is no info on the master address in ZK. We should make this clear as 
well. The best option I see is a specific exception such as 
NoMasterAddressException or NoMasterAddressInZooKeeperException

And MasterNotRunning can be: the master is actually there, but marked 
internally as non running (stopped). The server side method 'isMasterRunning' 
will return false (you can contact the master but it's stopping). As such I 
think is better not to have an exception named MasterNotRunning as it creates 
confusion between the technical status and the functional one. 


I think the pseudo code could be, on the client interface:
{noformat}
    public boolean isMasterRunning() throws MasterConnectionException, 
NoMasterAddressException, ZooKeeperConnectionException {
      ZK zk = getZK(); // Can throw ZooKeeperConnectionException
      Master m = getMaster(zk); // Can throw MasterConnectionException or 
NoMasterAddressException 
      boolean isRunning = m.isMasterRunning(); // can throw 
MasterConnectionException 

      return isRunning;
    }
{noformat}


                
> HMasterInterface.isMasterRunning() requires clean up
> ----------------------------------------------------
>
>                 Key: HBASE-6273
>                 URL: https://issues.apache.org/jira/browse/HBASE-6273
>             Project: HBase
>          Issue Type: Bug
>          Components: master
>    Affects Versions: 0.94.0
>            Reporter: ramkrishna.s.vasudevan
>             Fix For: 0.96.0
>
>
> This JIRA is in reference to JD's comments regarding the clean up needed in 
> isMasterRunning().  Refer to 
> https://issues.apache.org/jira/browse/HBASE-6240?focusedCommentId=13400772&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13400772

--
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

        

Reply via email to