hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhang...@apache.org
Subject hbase git commit: Revert "HBASE-16209 addendum fix region move delay"
Date Mon, 01 Aug 2016 07:53:35 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 c46f56b38 -> 51c8c1891


Revert "HBASE-16209 addendum fix region move delay"

This reverts commit c46f56b382ca1023c097326acda275e615b6c4e0.


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/51c8c189
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/51c8c189
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/51c8c189

Branch: refs/heads/branch-1
Commit: 51c8c1891a4d679ed22285f22c8f55a2f255974a
Parents: c46f56b
Author: zhangduo <zhangduo@apache.org>
Authored: Mon Aug 1 15:52:25 2016 +0800
Committer: zhangduo <zhangduo@apache.org>
Committed: Mon Aug 1 15:52:25 2016 +0800

----------------------------------------------------------------------
 .../apache/hadoop/hbase/master/AssignmentManager.java | 14 +++++++++-----
 .../hbase/master/handler/ClosedRegionHandler.java     |  2 +-
 2 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/51c8c189/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
----------------------------------------------------------------------
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 6225897..c21844a 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
@@ -3408,7 +3408,7 @@ public class AssignmentManager extends ZooKeeperListener {
     return true;
   }
 
-  public void invokeAssign(HRegionInfo regionInfo) {
+  void invokeAssign(HRegionInfo regionInfo) {
     invokeAssign(regionInfo, true);
   }
 
@@ -3421,6 +3421,12 @@ public class AssignmentManager extends ZooKeeperListener {
         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) {
     threadPoolExecutorService.submit(new UnAssignCallable(this, regionInfo));
   }
@@ -4492,10 +4498,8 @@ public class AssignmentManager extends ZooKeeperListener {
   }
 
   private class DelayedAssignCallable implements Runnable {
-
-    private final Callable<?> callable;
-
-    public DelayedAssignCallable(Callable<?> callable) {
+    Callable callable;
+    public DelayedAssignCallable(Callable callable) {
       this.callable = callable;
     }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/51c8c189/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/ClosedRegionHandler.java
----------------------------------------------------------------------
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 448d483..04106d8 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.invokeAssign(regionInfo);
+    assignmentManager.invokeAssignLaterOnFailure(regionInfo);
   }
 }


Mime
View raw message