Grokbase Groups HBase dev March 2010
TableServers.isMasterRunning() skips checking master status if master field is not null

Key: HBASE-2391
Project: Hadoop HBase
Issue Type: Bug
Components: client
Affects Versions: 0.20.3
Environment: CentOS
Reporter: Ted Yu

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 {

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categorieshbase, hadoop
postedMar 29, '10 at 9:34p
activeMar 29, '10 at 9:34p

1 user in discussion

Ted Yu (JIRA): 1 post



site design / logo © 2022 Grokbase