private static void setupActions() throws IOException { // Set up the action that will restart a region server holding a region from our table // because this table should only have one region we should be good. restartRSAction = new ChaosMonkey.RestartRsHoldingTable(SLEEP_TIME, tableName); // Set up the action that will kill the region holding meta. restartMetaAction = new ChaosMonkey.RestartRsHoldingMeta(SLEEP_TIME); // Set up the action that will move the regions of our table. moveRegionAction = new ChaosMonkey.MoveRegionsOfTable(SLEEP_TIME, tableName); // Kill the master restartMasterAction = new ChaosMonkey.RestartActiveMaster(1000); // Give the action the access to the cluster. ChaosMonkey.ActionContext actionContext = new ChaosMonkey.ActionContext(util); restartRSAction.init(actionContext); restartMetaAction.init(actionContext); moveRegionAction.init(actionContext); restartMasterAction.init(actionContext); }
@Before public void setUp() throws Exception { super.setUp(SERVER_COUNT); ChaosMonkey.Action[] actions = new ChaosMonkey.Action[] { new RestartRandomRs(60000), new BatchRestartRs(5000, 0.5f), new RestartActiveMaster(5000), new RollingBatchRestartRs(5000, 1.0f), new RestartRsHoldingMeta(35000), new RestartRsHoldingRoot(35000) }; monkey = new ChaosMonkey(util, new ChaosMonkey.CompositeSequentialPolicy( new ChaosMonkey.DoActionsOncePolicy(CHAOS_EVERY_MS, actions), new ChaosMonkey.PeriodicRandomActionPolicy(CHAOS_EVERY_MS, actions))); monkey.start(); }
@Before @SuppressWarnings("unchecked") public void setUp() throws Exception { super.setUp(NUM_SLAVES_BASE); ChaosMonkey.Policy chaosPolicy = new ChaosMonkey.PeriodicRandomActionPolicy( CHAOS_EVERY_MS, new UnbalanceKillAndRebalanceAction()); monkey = new ChaosMonkey(util, chaosPolicy); monkey.start(); }
@Before public void setUp() throws Exception { super.setUp(NUM_SLAVES_BASE); monkey = new ChaosMonkey(util, ChaosMonkey.EVERY_MINUTE_RANDOM_ACTION_POLICY); monkey.start(); }
public ActionCallable(ChaosMonkey.Action action) { this.action = action; }