本文整理汇总了Java中org.apache.hadoop.hbase.util.ChaosMonkey类的典型用法代码示例。如果您正苦于以下问题:Java ChaosMonkey类的具体用法?Java ChaosMonkey怎么用?Java ChaosMonkey使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ChaosMonkey类属于org.apache.hadoop.hbase.util包,在下文中一共展示了ChaosMonkey类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setupActions
import org.apache.hadoop.hbase.util.ChaosMonkey; //导入依赖的package包/类
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);
}
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:22,代码来源:IntegrationTestMTTR.java
示例2: setUp
import org.apache.hadoop.hbase.util.ChaosMonkey; //导入依赖的package包/类
@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();
}
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:17,代码来源:IntegrationTestDataIngestSlowDeterministic.java
示例3: setUp
import org.apache.hadoop.hbase.util.ChaosMonkey; //导入依赖的package包/类
@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();
}
开发者ID:daidong,项目名称:DominoHBase,代码行数:11,代码来源:IntegrationTestRebalanceAndKillServersTargeted.java
示例4: setUp
import org.apache.hadoop.hbase.util.ChaosMonkey; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
super.setUp(NUM_SLAVES_BASE);
monkey = new ChaosMonkey(util, ChaosMonkey.EVERY_MINUTE_RANDOM_ACTION_POLICY);
monkey.start();
}
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:7,代码来源:IntegrationTestDataIngestWithChaosMonkey.java
示例5: ActionCallable
import org.apache.hadoop.hbase.util.ChaosMonkey; //导入依赖的package包/类
public ActionCallable(ChaosMonkey.Action action) {
this.action = action;
}
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:4,代码来源:IntegrationTestMTTR.java
注:本文中的org.apache.hadoop.hbase.util.ChaosMonkey类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论