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 master has stale data. Presume remote side just split.
|
||||||
// Presume that the split message when it comes in will fix up the master's
|
// Presume that the split message when it comes in will fix up the master's
|
||||||
// in memory cluster state.
|
// in memory cluster state.
|
||||||
|
return;
|
||||||
|
} catch (Throwable t) {
|
||||||
|
if (t instanceof RemoteException) {
|
||||||
|
t = ((RemoteException)t).unwrapRemoteException();
|
||||||
|
if (t instanceof NotServingRegionException) {
|
||||||
if (checkIfRegionBelongsToDisabling(region)) {
|
if (checkIfRegionBelongsToDisabling(region)) {
|
||||||
// Remove from the regionsinTransition map
|
// Remove from the regionsinTransition map
|
||||||
LOG.info("While trying to recover the table:"
|
LOG.info("While trying to recover the table "
|
||||||
+ region.getTableNameAsString()
|
+ region.getTableNameAsString()
|
||||||
+ " from DISABLING state to DISABLED state, the region:" + region
|
+ " to DISABLED state the region " + region
|
||||||
+ " was already offlined.");
|
+ " was offlined but the table was in DISABLING state");
|
||||||
synchronized (this.regionsInTransition) {
|
synchronized (this.regionsInTransition) {
|
||||||
this.regionsInTransition.remove(region.getEncodedName());
|
this.regionsInTransition.remove(region.getEncodedName());
|
||||||
}
|
}
|
||||||
|
@ -1463,9 +1468,7 @@ public class AssignmentManager extends ZooKeeperListener {
|
||||||
this.regions.remove(region);
|
this.regions.remove(region);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Throwable t) {
|
}
|
||||||
if (t instanceof RemoteException) {
|
|
||||||
t = ((RemoteException)t).unwrapRemoteException();
|
|
||||||
}
|
}
|
||||||
LOG.info("Server " + server + " returned " + t + " for " +
|
LOG.info("Server " + server + " returned " + t + " for " +
|
||||||
region.getEncodedName());
|
region.getEncodedName());
|
||||||
|
|
Loading…
Reference in New Issue