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 1356068) +++ hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java (working copy) @@ -1774,6 +1774,26 @@ return; } } + else if (t instanceof java.net.SocketTimeoutException) { + if (this.regionsInTransition.get(region.getEncodedName()) == null + && plan.getDestination().equals(getRegionServerOfRegion(region))) { + LOG.warn("Call openRegion() to " + plan.getDestination() + + " has timed out when trying to assign " + region.getRegionNameAsString() + + ", but the region has already been opened successfully on " + + plan.getDestination() + ".", t); + return; + } + else { + // The destination region server is probably processing the region open, so it + // might be safer to try this region server again to avoid having two region + // servers open the same region. + LOG.warn("Call openRegion() to " + plan.getDestination() + + " has timed out when trying to assign " + region.getRegionNameAsString() + + ". Trying to assign to this region server again; retry=" + i, t); + state.update(RegionState.State.OFFLINE); + continue; + } + } LOG.warn("Failed assignment of " + state.getRegion().getRegionNameAsString() + " to " + plan.getDestination() + ", trying to assign elsewhere instead; " +