HBASE-13223 Add testMoveMeta to IntegrationTestMTTR
Signed-off-by: Andrew Purtell <apurtell@apache.org>
This commit is contained in:
parent
47787f2c3a
commit
bf9e32d59d
@ -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;
|
||||
|
||||
@ -271,6 +277,11 @@ public class IntegrationTestMTTR {
|
||||
run(new ActionCallable(restartMetaAction), "KillRsHoldingMeta");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMoveMeta() throws Exception {
|
||||
run(new ActionCallable(moveMetaRegionsAction), "MoveMeta");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMoveRegion() throws Exception {
|
||||
run(new ActionCallable(moveRegionAction), "MoveRegion");
|
||||
|
Loading…
x
Reference in New Issue
Block a user