hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Gray" <jg...@apache.org>
Subject Re: Review Request: Add ability to have multiple Masters in LocalHBaseCluster for test writing
Date Fri, 01 Oct 2010 17:00:03 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.cloudera.org/r/925/
-----------------------------------------------------------

(Updated 2010-10-01 10:00:03.133377)


Review request for hbase, stack, Karthik Ranganathan, and Kannan Muthukkaruppan.


Changes
-------

Adds TestMasterFailover which passes!  Starts cluster w/ 3 masters.  Stops a backup master,
then stops the active master, and verifies the other backup becomes the active master.  Doesn't
test w/ tables/data or regions-in-transition but the test framework improvements work.

A few things that were changed:

- can now close backup masters
- can now close active master w/o shutting down cluster
- regionserver reconnects to new master when fail over


Summary
-------

To really be able to unit test the new master properly, we need to be able to have multiple
masters running at once within a single logical cluster.

Also exposes methods to get the currently active master and can access each individually in
the same way that it's done for multiple RS.

This is mostly duplicating what we do for RS but for masters.


This addresses bug HBASE-3053.
    http://issues.apache.org/jira/browse/HBASE-3053


Diffs (updated)
-----

  trunk/src/main/java/org/apache/hadoop/hbase/HConstants.java 1003327 
  trunk/src/main/java/org/apache/hadoop/hbase/LocalHBaseCluster.java 1003327 
  trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java 1003327 
  trunk/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java 1003327 
  trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java 1003327 
  trunk/src/main/java/org/apache/hadoop/hbase/util/JVMClusterUtil.java 1003327 
  trunk/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWatcher.java 1003327 
  trunk/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java 1003327 
  trunk/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java 1003327 
  trunk/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java PRE-CREATION


Diff: http://review.cloudera.org/r/925/diff


Testing
-------

Untested but compiles.  This is first go at a patch.  I'm going to work on writing a new unit
test that uses this next.


Thanks,

Jonathan


Mime
View raw message