From a347d32cc5ab1e41e4ce94d52e863b2706dd661e Mon Sep 17 00:00:00 2001 From: stack Date: Tue, 4 Nov 2014 09:26:13 -0800 Subject: [PATCH] HBASE-12319: Inconsistencies during region recovery due to close/open of a region during recovery; REVERT -- UNSTABLE BUILD --- .../org/apache/hadoop/hbase/regionserver/HRegionServer.java | 2 +- .../hadoop/hbase/regionserver/TestRegionServerNoMaster.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java index be26b35b3f1..2f34587cbe2 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java @@ -2591,7 +2591,7 @@ public class HRegionServer extends HasThread implements if (actualRegion == null) { // If already online, we still need to close it. LOG.info("The opening previously in progress has been cancelled by a CLOSE request."); // The master deletes the znode when it receives this exception. - throw new RegionAlreadyInTransitionException("The region " + encodedName + + throw new NotServingRegionException("The region " + encodedName + " was opening but not yet served. Opening is cancelled."); } } else if (Boolean.FALSE.equals(previous)) { diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerNoMaster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerNoMaster.java index b58fb0feba6..14cae3c2380 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerNoMaster.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerNoMaster.java @@ -402,7 +402,7 @@ public class TestRegionServerNoMaster { getRS().rpcServices.closeRegion(null, crr); Assert.assertTrue(false); } catch (ServiceException expected) { - Assert.assertTrue(expected.getCause() instanceof RegionAlreadyInTransitionException); + Assert.assertTrue(expected.getCause() instanceof NotServingRegionException); } // The close should have left the ZK state as it is: it's the job the AM to delete it