HBASE-16209 addendum fix region move delay

This commit is contained in:
zhangduo 2016-08-01 11:29:18 +08:00
parent d54bcfb1e2
commit c46f56b382
2 changed files with 6 additions and 10 deletions

View File

@ -3408,7 +3408,7 @@ public class AssignmentManager extends ZooKeeperListener {
return true; return true;
} }
void invokeAssign(HRegionInfo regionInfo) { public void invokeAssign(HRegionInfo regionInfo) {
invokeAssign(regionInfo, true); invokeAssign(regionInfo, true);
} }
@ -3421,12 +3421,6 @@ public class AssignmentManager extends ZooKeeperListener {
new AssignCallable(this, regionInfo, true)), sleepMillis, TimeUnit.MILLISECONDS); new AssignCallable(this, regionInfo, true)), sleepMillis, TimeUnit.MILLISECONDS);
} }
public void invokeAssignLaterOnFailure(HRegionInfo regionInfo) {
long sleepTime = backoffPolicy.getBackoffTime(retryConfig,
failedOpenTracker.get(regionInfo.getEncodedName()).get());
invokeAssignLater(regionInfo, sleepTime);
}
void invokeUnAssign(HRegionInfo regionInfo) { void invokeUnAssign(HRegionInfo regionInfo) {
threadPoolExecutorService.submit(new UnAssignCallable(this, regionInfo)); threadPoolExecutorService.submit(new UnAssignCallable(this, regionInfo));
} }
@ -4498,8 +4492,10 @@ public class AssignmentManager extends ZooKeeperListener {
} }
private class DelayedAssignCallable implements Runnable { private class DelayedAssignCallable implements Runnable {
Callable callable;
public DelayedAssignCallable(Callable callable) { private final Callable<?> callable;
public DelayedAssignCallable(Callable<?> callable) {
this.callable = callable; this.callable = callable;
} }

View File

@ -103,6 +103,6 @@ public class ClosedRegionHandler extends EventHandler implements TotesHRegionInf
regionInfo, RegionState.State.CLOSED); regionInfo, RegionState.State.CLOSED);
// This below has to do w/ online enable/disable of a table // This below has to do w/ online enable/disable of a table
assignmentManager.removeClosedRegion(regionInfo); assignmentManager.removeClosedRegion(regionInfo);
assignmentManager.invokeAssignLaterOnFailure(regionInfo); assignmentManager.invokeAssign(regionInfo);
} }
} }