HBASE-13223 Add testMoveMeta to IntegrationTestMTTR
Signed-off-by: Andrew Purtell <[email protected]>
Conflicts:
hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/2a2884f6
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/2a2884f6
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/2a2884f6
Branch: refs/heads/0.98
Commit: 2a2884f6bf6c682675fc7b733fdf637d1effa2f0
Parents: 7fe3f33
Author: Dima Spivak <[email protected]>
Authored: Mon Mar 16 18:22:51 2015 -0700
Committer: Andrew Purtell <[email protected]>
Committed: Mon Mar 16 19:04:28 2015 -0700
----------------------------------------------------------------------
.../hadoop/hbase/mttr/IntegrationTestMTTR.java | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/2a2884f6/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 4e0257b..eb3e0e3 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;
@@ -105,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>
@@ -145,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;
@@ -192,6 +194,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.getNameAsString());
+
// Set up the action that will move the regions of our table.
moveRegionAction = new MoveRegionsOfTableAction(sleepTime,
MonkeyConstants.DEFAULT_MOVE_REGIONS_MAX_TIME,
tableName.getNameAsString());
@@ -203,6 +209,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);
}
@@ -252,6 +259,7 @@ public class IntegrationTestMTTR {
// Clean up the actions.
moveRegionAction = null;
restartMetaAction = null;
+ moveMetaRegionsAction = null;
restartRSAction = null;
restartMasterAction = null;
@@ -269,6 +277,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");
}