Index: src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java (revision 1343602) +++ src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java (working copy) @@ -328,7 +328,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 @@ -385,19 +384,20 @@ watcher.assignmentZNode); // 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 @@ -2440,8 +2440,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 @@ -2517,8 +2515,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); @@ -3197,7 +3197,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: src/main/java/org/apache/hadoop/hbase/master/HMaster.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/master/HMaster.java (revision 1343602) +++ src/main/java/org/apache/hadoop/hbase/master/HMaster.java (working copy) @@ -581,7 +581,6 @@ /** * Override to change master's splitLogAfterStartup. Used testing * @param mfs - * @param onlineServers */ protected void splitLogAfterStartup(final MasterFileSystem mfs) { mfs.splitLogAfterStartup(); Index: src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java (revision 1343602) +++ src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java (working copy) @@ -183,8 +183,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",