From 1b303ad75d4fed773eeab1f5c3d63691843ae9ac Mon Sep 17 00:00:00 2001 From: zhangduo Date: Mon, 1 Aug 2016 15:56:47 +0800 Subject: [PATCH] HBASE-16209 addendum fix region move delay --- .../org/apache/hadoop/hbase/master/AssignmentManager.java | 8 +++++--- .../hadoop/hbase/master/handler/ClosedRegionHandler.java | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java index c21844a0548..73b8a5ed5f0 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java @@ -3412,7 +3412,7 @@ public class AssignmentManager extends ZooKeeperListener { invokeAssign(regionInfo, true); } - void invokeAssign(HRegionInfo regionInfo, boolean newPlan) { + public void invokeAssign(HRegionInfo regionInfo, boolean newPlan) { threadPoolExecutorService.submit(new AssignCallable(this, regionInfo, newPlan)); } @@ -4498,8 +4498,10 @@ public class AssignmentManager extends ZooKeeperListener { } private class DelayedAssignCallable implements Runnable { - Callable callable; - public DelayedAssignCallable(Callable callable) { + + Callable callable; + + public DelayedAssignCallable(Callable callable) { this.callable = callable; } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/ClosedRegionHandler.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/ClosedRegionHandler.java index 04106d821b6..277ad648a3f 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/ClosedRegionHandler.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/ClosedRegionHandler.java @@ -103,6 +103,6 @@ public class ClosedRegionHandler extends EventHandler implements TotesHRegionInf regionInfo, RegionState.State.CLOSED); // This below has to do w/ online enable/disable of a table assignmentManager.removeClosedRegion(regionInfo); - assignmentManager.invokeAssignLaterOnFailure(regionInfo); + assignmentManager.invokeAssign(regionInfo, false); } }