hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Daniel Cryans <jdcry...@apache.org>
Subject Re: connection.isMasterRunning()
Date Mon, 29 Mar 2010 21:25:23 GMT
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).

So we should first consider if this method is useful at all, and if so
then what would be the best fix. For example, if you run a HMerge
while the master is down but the region servers are up, you're going
to end up with something wrong since it expects hbase to be completely

Can you open a jira to continue discussions there?



On Mon, Mar 29, 2010 at 2:01 PM, Ted Yu <yuzhihong@gmail.com> wrote:
> Hi,
> 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.
> Regards

View raw message