From c42b256df412e26727da402b1ef3594fc5f2ea33 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Fri, 4 Mar 2011 00:31:16 +0000 Subject: [PATCH] HBASE-3601 TestMasterFailover broken in TRUNK git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1076901 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 1 + src/main/java/org/apache/hadoop/hbase/master/HMaster.java | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 09c4bba26e2..c3ebc0bd130 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -57,6 +57,7 @@ Release 0.91.0 - Unreleased mapreduce jobs correctly (Dan Harvey via Stack) HBASE-3514 Speedup HFile.Writer append (Matteo via Ryan) HBASE-3593 DemoClient.cpp is outdated + HBASE-3601 TestMasterFailover broken in TRUNK IMPROVEMENTS HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack) diff --git a/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/src/main/java/org/apache/hadoop/hbase/master/HMaster.java index 3f3b696cdc6..41c8c8f5782 100644 --- a/src/main/java/org/apache/hadoop/hbase/master/HMaster.java +++ b/src/main/java/org/apache/hadoop/hbase/master/HMaster.java @@ -431,6 +431,10 @@ implements HMasterInterface, HMasterRegionInterface, MasterServices, Server { this.assignmentManager.assignRoot(); this.catalogTracker.waitForRoot(); assigned++; + } else { + // Region already assigned. We didnt' assign it. Add to in-memory state. + this.assignmentManager.regionOnline(HRegionInfo.ROOT_REGIONINFO, + this.serverManager.getHServerInfo(this.catalogTracker.getRootLocation())); } LOG.info("-ROOT- assigned=" + assigned + ", rit=" + rit + ", location=" + catalogTracker.getRootLocation()); @@ -445,6 +449,10 @@ implements HMasterInterface, HMasterRegionInterface, MasterServices, Server { // guarantee that the transition has completed this.assignmentManager.waitForAssignment(HRegionInfo.FIRST_META_REGIONINFO); assigned++; + } else { + // Region already assigned. We didnt' assign it. Add to in-memory state. + this.assignmentManager.regionOnline(HRegionInfo.FIRST_META_REGIONINFO, + this.serverManager.getHServerInfo(this.catalogTracker.getMetaLocation())); } LOG.info(".META. assigned=" + assigned + ", rit=" + rit + ", location=" + catalogTracker.getMetaLocation());