Index: hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java =================================================================== --- hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java (revision 1343535) +++ hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java (working copy) @@ -338,7 +338,6 @@ /** * Called on startup. * Figures whether a fresh cluster start of we are joining extant running cluster. - * @param onlineServers onlined servers when master started * @throws IOException * @throws KeeperException * @throws InterruptedException @@ -406,18 +405,20 @@ // Run through all regions. If they are not assigned and not in RIT, then // its a clean cluster startup, else its a failover. - for (Map.Entry e: this.regions.entrySet()) { - if (!e.getKey().isMetaTable() && e.getValue() != null) { - LOG.debug("Found " + e + " out on cluster"); - this.failover = true; - break; + synchronized (this.regions) { + for (Map.Entry e: this.regions.entrySet()) { + if (!e.getKey().isMetaTable() && e.getValue() != null) { + LOG.debug("Found " + e + " out on cluster"); + this.failover = true; + break; + } + if (nodes.contains(e.getKey().getEncodedName())) { + LOG.debug("Found " + e.getKey().getRegionNameAsString() + " in RITs"); + // Could be a meta region. + this.failover = true; + break; + } } - if (nodes.contains(e.getKey().getEncodedName())) { - LOG.debug("Found " + e.getKey().getRegionNameAsString() + " in RITs"); - // Could be a meta region. - this.failover = true; - break; - } } // Remove regions in RIT, they are possibly being processed by @@ -2493,8 +2494,6 @@ *

* Returns a map of servers that are not found to be online and the regions * they were hosting. - * @param onlineServers if one region's location belongs to onlineServers, it - * doesn't need to be assigned. * @return map of servers not online to their assigned regions, as stored * in META * @throws IOException @@ -2570,8 +2569,10 @@ // add only if region not in disabled and enabling table if (false == checkIfRegionBelongsToDisabled(regionInfo) && false == checkIfRegionsBelongsToEnabling(regionInfo)) { - regions.put(regionInfo, regionLocation); - addToServers(regionLocation, regionInfo); + synchronized (this.regions) { + regions.put(regionInfo, regionLocation); + addToServers(regionLocation, regionInfo); + } } disablingOrEnabling = addTheTablesInPartialState(this.disablingTables, this.enablingTables, regionInfo, tableName); @@ -3283,7 +3284,6 @@ * Run through remaining regionservers and unassign all catalog regions. */ void unassignCatalogRegions() { - this.servers.entrySet(); synchronized (this.regions) { for (Map.Entry> e: this.servers.entrySet()) { Set regions = e.getValue(); Index: hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java =================================================================== --- hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java (revision 1343535) +++ hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java (working copy) @@ -662,7 +662,6 @@ /** * Override to change master's splitLogAfterStartup. Used testing * @param mfs - * @param onlineServers */ protected void splitLogAfterStartup(final MasterFileSystem mfs) { mfs.splitLogAfterStartup(); Index: hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java =================================================================== --- hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java (revision 1343535) +++ hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java (working copy) @@ -187,8 +187,6 @@ /** * Inspect the log directory to recover any log file without * an active region server. - * @param onlineServers Set of online servers keyed by - * {@link ServerName} */ void splitLogAfterStartup() { boolean retrySplitting = !conf.getBoolean("hbase.hlog.split.skip.errors",