Java 类org.apache.hadoop.hbase.util.ChaosMonkey 实例源码

项目:LCIndex-HBase-0.94.16    文件:IntegrationTestMTTR.java   
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);
}
项目:LCIndex-HBase-0.94.16    文件:IntegrationTestDataIngestSlowDeterministic.java   
@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();
}
项目:IRIndex    文件:IntegrationTestMTTR.java   
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);
}
项目:IRIndex    文件:IntegrationTestDataIngestSlowDeterministic.java   
@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();
}
项目:HBase-Research    文件:IntegrationTestDataIngestSlowDeterministic.java   
@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();
}
项目:hbase-0.94.8-qod    文件:IntegrationTestDataIngestSlowDeterministic.java   
@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();
}
项目:hbase-0.94.8-qod    文件:IntegrationTestDataIngestSlowDeterministic.java   
@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();
}
项目:hindex    文件:IntegrationTestDataIngestSlowDeterministic.java   
@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();
}
项目:DominoHBase    文件:IntegrationTestRebalanceAndKillServersTargeted.java   
@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();
}
项目:LCIndex-HBase-0.94.16    文件:IntegrationTestDataIngestWithChaosMonkey.java   
@Before
public void setUp() throws Exception {
  super.setUp(NUM_SLAVES_BASE);
  monkey = new ChaosMonkey(util, ChaosMonkey.EVERY_MINUTE_RANDOM_ACTION_POLICY);
  monkey.start();
}
项目:LCIndex-HBase-0.94.16    文件:IntegrationTestMTTR.java   
public ActionCallable(ChaosMonkey.Action action) {
  this.action = action;
}
项目:IRIndex    文件:IntegrationTestDataIngestWithChaosMonkey.java   
@Before
public void setUp() throws Exception {
  super.setUp(NUM_SLAVES_BASE);
  monkey = new ChaosMonkey(util, ChaosMonkey.EVERY_MINUTE_RANDOM_ACTION_POLICY);
  monkey.start();
}
项目:IRIndex    文件:IntegrationTestMTTR.java   
public ActionCallable(ChaosMonkey.Action action) {
  this.action = action;
}
项目:HBase-Research    文件:IntegrationTestDataIngestWithChaosMonkey.java   
@Before
public void setUp() throws Exception {
  super.setUp(NUM_SLAVES_BASE);
  monkey = new ChaosMonkey(util, ChaosMonkey.EVERY_MINUTE_RANDOM_ACTION_POLICY);
  monkey.start();
}
项目:hbase-0.94.8-qod    文件:IntegrationTestDataIngestWithChaosMonkey.java   
@Before
public void setUp() throws Exception {
  super.setUp(NUM_SLAVES_BASE);
  monkey = new ChaosMonkey(util, ChaosMonkey.EVERY_MINUTE_RANDOM_ACTION_POLICY);
  monkey.start();
}
项目:hbase-0.94.8-qod    文件:IntegrationTestDataIngestWithChaosMonkey.java   
@Before
public void setUp() throws Exception {
  super.setUp(NUM_SLAVES_BASE);
  monkey = new ChaosMonkey(util, ChaosMonkey.EVERY_MINUTE_RANDOM_ACTION_POLICY);
  monkey.start();
}
项目:DominoHBase    文件:IntegrationTestDataIngestWithChaosMonkey.java   
@Before
public void setUp() throws Exception {
  super.setUp(NUM_SLAVES_BASE);
  monkey = new ChaosMonkey(util, ChaosMonkey.EVERY_MINUTE_RANDOM_ACTION_POLICY);
  monkey.start();
}
项目:hindex    文件:IntegrationTestDataIngestWithChaosMonkey.java   
@Before
public void setUp() throws Exception {
  super.setUp(NUM_SLAVES_BASE);
  monkey = new ChaosMonkey(util, ChaosMonkey.EVERY_MINUTE_RANDOM_ACTION_POLICY);
  monkey.start();
}