HBASE-4052 reapply code in unassign() which handles NotServingRegionException
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1147819 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3b0a7528c9
commit
8ae3106b95
|
@ -1449,12 +1449,17 @@ public class AssignmentManager extends ZooKeeperListener {
|
|||
// Presume that master has stale data. Presume remote side just split.
|
||||
// Presume that the split message when it comes in will fix up the master's
|
||||
// in memory cluster state.
|
||||
return;
|
||||
} catch (Throwable t) {
|
||||
if (t instanceof RemoteException) {
|
||||
t = ((RemoteException)t).unwrapRemoteException();
|
||||
if (t instanceof NotServingRegionException) {
|
||||
if (checkIfRegionBelongsToDisabling(region)) {
|
||||
// Remove from the regionsinTransition map
|
||||
LOG.info("While trying to recover the table:"
|
||||
LOG.info("While trying to recover the table "
|
||||
+ region.getTableNameAsString()
|
||||
+ " from DISABLING state to DISABLED state, the region:" + region
|
||||
+ " was already offlined.");
|
||||
+ " to DISABLED state the region " + region
|
||||
+ " was offlined but the table was in DISABLING state");
|
||||
synchronized (this.regionsInTransition) {
|
||||
this.regionsInTransition.remove(region.getEncodedName());
|
||||
}
|
||||
|
@ -1463,9 +1468,7 @@ public class AssignmentManager extends ZooKeeperListener {
|
|||
this.regions.remove(region);
|
||||
}
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
if (t instanceof RemoteException) {
|
||||
t = ((RemoteException)t).unwrapRemoteException();
|
||||
}
|
||||
}
|
||||
LOG.info("Server " + server + " returned " + t + " for " +
|
||||
region.getEncodedName());
|
||||
|
|
Loading…
Reference in New Issue