Index: src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java (revision 1081994) +++ src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java (working copy) @@ -87,7 +87,6 @@ import org.apache.hadoop.hbase.util.Pair; import org.apache.hadoop.hbase.util.Writables; import org.apache.hadoop.io.Writable; -import org.apache.hadoop.util.Progressable; import org.apache.hadoop.util.StringUtils; import com.google.common.collect.Lists; Index: src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java (revision 1081994) +++ src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java (working copy) @@ -193,8 +193,9 @@ * transition. Presumes .META. and -ROOT- deployed. * @throws KeeperException * @throws IOException + * @throws InterruptedException */ - void processFailover() throws KeeperException, IOException { + void processFailover() throws KeeperException, IOException, InterruptedException { // Concurrency note: In the below the accesses on regionsInTransition are // outside of a synchronization block where usually all accesses to RIT are // synchronized. The presumption is that in this case it is safe since this @@ -204,6 +205,14 @@ // TODO: Regions that have a null location and are not in regionsInTransitions // need to be handled. + // Add -ROOT- and .META. on regions map. They must be deployed if we got + // this far. Caller takes care of it. + HServerInfo hsi = + this.serverManager.getHServerInfo(this.catalogTracker.getMetaLocation()); + regionOnline(HRegionInfo.FIRST_META_REGIONINFO, hsi); + hsi = this.serverManager.getHServerInfo(this.catalogTracker.getRootLocation()); + regionOnline(HRegionInfo.ROOT_REGIONINFO, hsi); + // Scan META to build list of existing regions, servers, and assignment // Returns servers who have not checked in (assumed dead) and their regions Map>> deadServers = Index: src/main/java/org/apache/hadoop/hbase/master/handler/OpenedRegionHandler.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/master/handler/OpenedRegionHandler.java (revision 1081994) +++ src/main/java/org/apache/hadoop/hbase/master/handler/OpenedRegionHandler.java (working copy) @@ -91,7 +91,14 @@ server.abort("Error deleting OPENED node in ZK for transition ZK node (" + regionInfo.getEncodedName() + ")", e); } - this.assignmentManager.regionOnline(regionInfo, serverInfo); + // Code to defend against case where we get SPLIT before region open + // processing completes; temporary till we make SPLITs go via zk -- 0.92. + if (this.assignmentManager.isRegionInTransition(regionInfo) == null) { + this.assignmentManager.regionOnline(regionInfo, serverInfo); + } else { + LOG.warn("Skipping the onining of " + regionInfo.getRegionNameAsString() + + " because regions is NOT in RIT -- presuming this is because it SPLIT"); + } if (this.assignmentManager.getZKTable().isDisablingOrDisabledTable( regionInfo.getTableDesc().getNameAsString())) { LOG.debug("Opened region " + regionInfo.getRegionNameAsString() + " but "