Repository: hbase
Updated Branches:
  refs/heads/0.98 7fe3f3377 -> 2a2884f6b
  refs/heads/branch-1 71f22ebfb -> 04ac18917
  refs/heads/branch-1.0 9cdcddcfa -> 80c52869d
  refs/heads/master 47787f2c3 -> bf9e32d59


HBASE-13223 Add testMoveMeta to IntegrationTestMTTR

Signed-off-by: Andrew Purtell <[email protected]>


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

Branch: refs/heads/master
Commit: bf9e32d59d65afa6425f03e488959c8883038801
Parents: 47787f2
Author: Dima Spivak <[email protected]>
Authored: Mon Mar 16 18:22:51 2015 -0700
Committer: Andrew Purtell <[email protected]>
Committed: Mon Mar 16 18:22:51 2015 -0700

----------------------------------------------------------------------
 .../hadoop/hbase/mttr/IntegrationTestMTTR.java     | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/bf9e32d5/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java
----------------------------------------------------------------------
diff --git 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java
index 824e87f..4423650 100644
--- 
a/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java
+++ 
b/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java
@@ -36,13 +36,13 @@ import org.apache.hadoop.hbase.ClusterStatus;
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.IntegrationTestingUtility;
-import org.apache.hadoop.hbase.testclassification.IntegrationTests;
 import org.apache.hadoop.hbase.InvalidFamilyOperationException;
 import org.apache.hadoop.hbase.NamespaceExistException;
 import org.apache.hadoop.hbase.NamespaceNotFoundException;
 import org.apache.hadoop.hbase.TableExistsException;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.TableNotFoundException;
+import org.apache.hadoop.hbase.testclassification.IntegrationTests;
 import org.apache.hadoop.hbase.chaos.actions.Action;
 import org.apache.hadoop.hbase.chaos.actions.MoveRegionsOfTableAction;
 import org.apache.hadoop.hbase.chaos.actions.RestartActiveMasterAction;
@@ -50,8 +50,6 @@ import 
org.apache.hadoop.hbase.chaos.actions.RestartRsHoldingMetaAction;
 import org.apache.hadoop.hbase.chaos.actions.RestartRsHoldingTableAction;
 import org.apache.hadoop.hbase.chaos.factories.MonkeyConstants;
 import org.apache.hadoop.hbase.client.Admin;
-import org.apache.hadoop.hbase.client.HBaseAdmin;
-import org.apache.hadoop.hbase.client.HTable;
 import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.ResultScanner;
@@ -107,6 +105,7 @@ import com.google.common.base.Objects;
  * The ChaosMonkey actions currently run are:
  * <ul>
  * <li>Restart the RegionServer holding meta.</li>
+ * <li>Move the Regions of meta.</li>
  * <li>Restart the RegionServer holding the table the scan and put threads are 
targeting.</li>
  * <li>Move the Regions of the table used by the scan and put threads.</li>
  * <li>Restart the master.</li>
@@ -147,6 +146,7 @@ public class IntegrationTestMTTR {
    */
   private static Action restartRSAction;
   private static Action restartMetaAction;
+  private static Action moveMetaRegionsAction;
   private static Action moveRegionAction;
   private static Action restartMasterAction;
 
@@ -195,6 +195,10 @@ public class IntegrationTestMTTR {
     // Set up the action that will kill the region holding meta.
     restartMetaAction = new RestartRsHoldingMetaAction(sleepTime);
 
+    // Set up the action that will move the regions of meta.
+    moveMetaRegionsAction = new MoveRegionsOfTableAction(sleepTime,
+        MonkeyConstants.DEFAULT_MOVE_REGIONS_MAX_TIME, 
TableName.META_TABLE_NAME);
+
     // Set up the action that will move the regions of our table.
     moveRegionAction = new MoveRegionsOfTableAction(sleepTime,
         MonkeyConstants.DEFAULT_MOVE_REGIONS_MAX_TIME, tableName);
@@ -206,6 +210,7 @@ public class IntegrationTestMTTR {
     Action.ActionContext actionContext = new Action.ActionContext(util);
     restartRSAction.init(actionContext);
     restartMetaAction.init(actionContext);
+    moveMetaRegionsAction.init(actionContext);
     moveRegionAction.init(actionContext);
     restartMasterAction.init(actionContext);
   }
@@ -255,6 +260,7 @@ public class IntegrationTestMTTR {
     // Clean up the actions.
     moveRegionAction = null;
     restartMetaAction = null;
+    moveMetaRegionsAction = null;
     restartRSAction = null;
     restartMasterAction = null;
 
@@ -272,6 +278,11 @@ public class IntegrationTestMTTR {
   }
 
   @Test
+  public void testMoveMeta() throws Exception {
+    run(new ActionCallable(moveMetaRegionsAction), "MoveMeta");
+  }
+
+  @Test
   public void testMoveRegion() throws Exception {
     run(new ActionCallable(moveRegionAction), "MoveRegion");
   }

Reply via email to