[
https://issues.apache.org/jira/browse/HBASE-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
stack resolved HBASE-2391.
--------------------------
Fix Version/s: 0.90.0
Resolution: Fixed
Fixed by hbase-2692. It does this now:
{code}
public boolean isMasterRunning()
throws MasterNotRunningException, ZooKeeperConnectionException {
if (this.master == null) {
getMaster();
}
boolean isRunning = master.isMasterRunning();
if(isRunning) {
return true;
}
throw new MasterNotRunningException();
}
{code}
> TableServers.isMasterRunning() skips checking master status if master field
> is not null
> ---------------------------------------------------------------------------------------
>
> Key: HBASE-2391
> URL: https://issues.apache.org/jira/browse/HBASE-2391
> Project: HBase
> Issue Type: Bug
> Components: client
> Affects Versions: 0.20.3
> Environment: CentOS
> Reporter: Ted Yu
> Fix For: 0.90.0
>
>
> We call HBaseAdmin.isMasterRunning() to see if client has connection with
> HBase.
> While going over TableServers.isMasterRunning() in HConnectionManager, I see
> this:
> public boolean isMasterRunning() {
> if (this.master == null) {
> try {
> getMaster();
>
> } catch (MasterNotRunningException e) {
> return false;
> }
> }
> return true;
> }
> When isMasterRunning() is called the first time, if master is obtained
> successfully, master field would contain reference to HMasterInterface.
> Subsequent calls to isMasterRunning() wouldn't throw
> MasterNotRunningException even if master server stops responding to clients.
> I think master.isMasterRunning() should be called if master isn't null.
> J-D pointed out that:
> I think this method wasn't updated when we moved to Zookeeper (since
> in pre-0.20, dead master = dead cluster), also looking at when this is
> called, I only see it from HMerge and HBaseAdmin.isMasterRunning()...
> which in turn isn't called anywhere in the java code (I think we call
> it in the shell tho).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.