You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by vi...@apache.org on 2014/12/18 20:31:25 UTC

[2/2] hbase git commit: Revert "HBASE-12694 testTableExistsIfTheSpecifiedTableRegionIsSplitParent in TestSplitTransactionOnCluster class leaves regions in transition (Vandana Ayyalasomayajula)"

Revert "HBASE-12694 testTableExistsIfTheSpecifiedTableRegionIsSplitParent in TestSplitTransactionOnCluster class leaves regions in transition (Vandana Ayyalasomayajula)"

This reverts commit 9ae615f82bc0521b7301bb5ea99f0367fc20f746.


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

Branch: refs/heads/master
Commit: 3caae62390615aa2568794247fb6193582490642
Parents: 9ae615f
Author: Virag Kothari <vi...@yahoo-inc.com>
Authored: Thu Dec 18 11:29:39 2014 -0800
Committer: Virag Kothari <vi...@yahoo-inc.com>
Committed: Thu Dec 18 11:29:39 2014 -0800

----------------------------------------------------------------------
 .../TestSplitTransactionOnCluster.java          | 21 ++------------------
 1 file changed, 2 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/3caae623/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java
index 0d574f6..4138027 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java
@@ -41,7 +41,6 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.Abortable;
 import org.apache.hadoop.hbase.CoordinatedStateManager;
 import org.apache.hadoop.hbase.Coprocessor;
-import org.apache.hadoop.hbase.CoprocessorEnvironment;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HConstants;
@@ -201,10 +200,7 @@ public class TestSplitTransactionOnCluster {
       this.admin.split(region.getRegionName(), new byte[] {42});
 
       // we have to wait until the SPLITTING state is seen by the master
-      FailingSplitRegionObserver observer = (FailingSplitRegionObserver) region
-          .getCoprocessorHost().findCoprocessor(FailingSplitRegionObserver.class.getName());
-      assertNotNull(observer);
-      observer.latch.await();
+      FailingSplitRegionObserver.latch.await();
 
       LOG.info("Waiting for region to come out of RIT");
       TESTING_UTIL.waitFor(60000, 1000, new Waiter.Predicate<Exception>() {
@@ -270,11 +266,7 @@ public class TestSplitTransactionOnCluster {
   }
 
   public static class FailingSplitRegionObserver extends BaseRegionObserver {
-    volatile CountDownLatch latch;
-    @Override
-    public void start(CoprocessorEnvironment e) throws IOException {
-      latch = new CountDownLatch(1);
-    }
+    static volatile CountDownLatch latch = new CountDownLatch(1);
     @Override
     public void preSplitBeforePONR(ObserverContext<RegionCoprocessorEnvironment> ctx,
         byte[] splitKey, List<Mutation> metaEntries) throws IOException {
@@ -657,19 +649,10 @@ public class TestSplitTransactionOnCluster {
       tableExists = MetaTableAccessor.tableExists(regionServer.getConnection(),
         tableName);
       assertEquals("The specified table should present.", true, tableExists);
-      Map<String, RegionState> rit = cluster.getMaster().getAssignmentManager().getRegionStates()
-          .getRegionsInTransition();
-      assertTrue(rit.size() == 3);
-      cluster.getMaster().getAssignmentManager().regionOffline(st.getFirstDaughter());
-      cluster.getMaster().getAssignmentManager().regionOffline(st.getSecondDaughter());
-      cluster.getMaster().getAssignmentManager().regionOffline(region.getRegionInfo());
-      rit = cluster.getMaster().getAssignmentManager().getRegionStates().getRegionsInTransition();
-      assertTrue(rit.size() == 0);
     } finally {
       admin.setBalancerRunning(true, false);
       cluster.getMaster().setCatalogJanitorEnabled(true);
       t.close();
-      TESTING_UTIL.deleteTable(tableName);
     }
   }