You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Nitay Joffe (JIRA)" <ji...@apache.org> on 2009/02/19 01:49:02 UTC

[jira] Updated: (HBASE-1145) Ensure that there is only 1 Master with Zookeeper

     [ https://issues.apache.org/jira/browse/HBASE-1145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nitay Joffe updated HBASE-1145:
-------------------------------

    Attachment: hbase-1145.patch

First stab at this.

In this patch:

- Remove "hbase.master" hbase-default.xml. This property is not required anymore, but it still used if it exists. Replaced "local" mode with a new boolean property, "run.distributed" which defaults to false. Local mode is used if "hbase.master" is either missing or null, and "run.distributed" is false.
- Add property for master port. When "hbase.master" does not exist, we construct the master's address by looking up our hostname and appending the port to that.  
- HConnectionManager/HRegionServer read master address form ZooKeeper.
- Master startup is done by a race to grab the ephemeral ZNode in ZooKeeper. The user is free to spin up as many masters as they like. When a master starts up it waits until the ZNode is available (either because it didn't exist or because the master owning it died and triggered a NodeDeleted event to the watcher). Once it's available, the master tries to write its address to it. Whoever wins continues with its initialization and becomes the master while the others resume watching the ZNode.


Note that currently if a master goes down and another one takes over the regionservers will not find it. I will file a separate issue for the regionservers to check/watch the master address in ZooKeeper.

> Ensure that there is only 1 Master with Zookeeper
> -------------------------------------------------
>
>                 Key: HBASE-1145
>                 URL: https://issues.apache.org/jira/browse/HBASE-1145
>             Project: Hadoop HBase
>          Issue Type: Sub-task
>            Reporter: Jean-Daniel Cryans
>            Assignee: Nitay Joffe
>         Attachments: hbase-1145.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.