hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nitay Joffe (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HBASE-1205) RegionServers should find new master when a new master comes up.
Date Mon, 30 Mar 2009 20:17:50 GMT

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

Nitay Joffe updated HBASE-1205:
-------------------------------

    Attachment: hbase-nitay-regionserver-aa0-000-12.u.powerset.com.log
                hbase-1205.patch

In this patch:

We register the HRegionServer as a watcher on the master address ephemeral ZNode in ZooKeeper.
The HRegionServer watches for "NodeCreated" events on that ZNode, which means a new master
has come up and written its address to the ZNode. When that event is received, we call getMaster()
to set the hbaseMaster instance variable to the new master address. Any current operations
going on which were using the old master will fail their retries eventually and get automatically
switched over to the new master next time.

I made the sleeper variable that's used in run() an instance variable so that I can use it
in other places like watchMasterAddress().


I tested this by taking down the master on my 4 node cluster and bringing it up elsewhere.
I've attached the log from a regionserver. This is the cool part:

{code}
2009-03-30 07:57:13,977 INFO org.apache.hadoop.ipc.HBaseClass: Retrying connect to server:
/208.76.44.158:60007. Already tried 0 time(s).
2009-03-30 07:57:14,987 INFO org.apache.hadoop.ipc.HBaseClass: Retrying connect to server:
/208.76.44.158:60007. Already tried 1 time(s).
2009-03-30 07:57:15,232 DEBUG org.apache.hadoop.hbase.regionserver.HRegionServer: Got ZooKeeper
event, state: SyncConnected, type: NodeCreated, path: /hbase/master
2009-03-30 07:57:15,233 DEBUG org.apache.hadoop.hbase.zookeeper.ZooKeeperWrapper: Read ZNode
/hbase/master got 208.76.44.139:60007
2009-03-30 07:57:15,233 DEBUG org.apache.hadoop.hbase.regionserver.HRegionServer: Telling
master at 208.76.44.139:60007 that we are up
{code}

> RegionServers should find new master when a new master comes up.
> ----------------------------------------------------------------
>
>                 Key: HBASE-1205
>                 URL: https://issues.apache.org/jira/browse/HBASE-1205
>             Project: Hadoop HBase
>          Issue Type: Improvement
>            Reporter: Nitay Joffe
>            Assignee: Nitay Joffe
>         Attachments: hbase-1205.patch, hbase-nitay-regionserver-aa0-000-12.u.powerset.com.log
>
>


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


Mime
View raw message