hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jxi...@apache.org
Subject svn commit: r1577416 - in /hbase/trunk/hbase-server/src: main/java/org/apache/hadoop/hbase/master/AssignmentManager.java test/java/org/apache/hadoop/hbase/master/TestAssignmentManagerOnCluster.java
Date Fri, 14 Mar 2014 03:06:32 GMT
Author: jxiang
Date: Fri Mar 14 03:06:32 2014
New Revision: 1577416

URL: http://svn.apache.org/r1577416
Log:
HBASE-10744 AM#CloseRegion no need to retry on FailedServerException

Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
    hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestAssignmentManagerOnCluster.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java?rev=1577416&r1=1577415&r2=1577416&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
Fri Mar 14 03:06:32 2014
@@ -62,6 +62,7 @@ import org.apache.hadoop.hbase.exception
 import org.apache.hadoop.hbase.executor.EventHandler;
 import org.apache.hadoop.hbase.executor.EventType;
 import org.apache.hadoop.hbase.executor.ExecutorService;
+import org.apache.hadoop.hbase.ipc.RpcClient.FailedServerException;
 import org.apache.hadoop.hbase.ipc.ServerNotRunningYetException;
 import org.apache.hadoop.hbase.master.RegionState.State;
 import org.apache.hadoop.hbase.master.balancer.FavoredNodeAssignmentHelper;
@@ -1697,7 +1698,9 @@ public class AssignmentManager extends Z
           t = ((RemoteException)t).unwrapRemoteException();
         }
         if (t instanceof NotServingRegionException
-            || t instanceof RegionServerStoppedException) {
+            || t instanceof RegionServerStoppedException
+            || t instanceof ServerNotRunningYetException
+            || t instanceof FailedServerException) {
           LOG.debug("Offline " + region.getRegionNameAsString()
             + ", it's not any more on " + server, t);
           if (transitionInZK) {
@@ -2121,7 +2124,7 @@ public class AssignmentManager extends Z
    * if no servers to assign, it returns null).
    */
   private RegionPlan getRegionPlan(final HRegionInfo region,
-      final boolean forceNewPlan)  throws HBaseIOException  {
+      final boolean forceNewPlan)  throws HBaseIOException {
     return getRegionPlan(region, null, forceNewPlan);
   }
 

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestAssignmentManagerOnCluster.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestAssignmentManagerOnCluster.java?rev=1577416&r1=1577415&r2=1577416&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestAssignmentManagerOnCluster.java
(original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestAssignmentManagerOnCluster.java
Fri Mar 14 03:06:32 2014
@@ -750,23 +750,14 @@ public class TestAssignmentManagerOnClus
       // You can't assign a dead region before SSH
       am.assign(hri, true, true);
       RegionState state = regionStates.getRegionState(hri);
-      assertTrue(state.isFailedClose());
+      assertTrue(state.isOffline());
 
       // You can't unassign a dead region before SSH either
       am.unassign(hri, true);
-      state = regionStates.getRegionState(hri);
-      assertTrue(state.isFailedClose());
+      assertTrue(state.isOffline());
 
-      synchronized (regionStates) {
-        // Enable SSH so that log can be split
-        master.enableSSH(true);
-
-        // We hold regionStates now, so logSplit
-        // won't be known to AM yet.
-        am.unassign(hri, true);
-        state = regionStates.getRegionState(hri);
-        assertTrue(state.isOffline());
-      }
+      // Enable SSH so that log can be split
+      master.enableSSH(true);
 
       // let's check if it's assigned after it's out of transition.
       // no need to assign it manually, SSH should do it



Mime
View raw message