HBASE-8239 ChaosMonkey action for root is irrelevant

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1466163 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
sershe 2013-04-09 18:05:02 +00:00
parent a7c40622ae
commit c8566f1ae6
4 changed files with 3 additions and 23 deletions

View File

@ -154,7 +154,7 @@ public class HRegionInfo implements Comparable<HRegionInfo> {
/**
* Use logging.
* @param encodedRegionName The encoded regionname.
* @return <code>.META.</code> if passed </code>1028785192</code> else returns
* @return <code>.META.</code> if passed <code>1028785192</code> else returns
* <code>encodedRegionName</code>
*/
public static String prettyPrint(final String encodedRegionName) {

View File

@ -290,4 +290,4 @@ public class DistributedHBaseCluster extends HBaseCluster {
stopRegionServer(currentServers.get(hostname));
}
}
}
}

View File

@ -22,7 +22,6 @@ import org.apache.hadoop.hbase.util.ChaosMonkey.BatchRestartRs;
import org.apache.hadoop.hbase.util.ChaosMonkey.RestartActiveMaster;
import org.apache.hadoop.hbase.util.ChaosMonkey.RestartRandomRs;
import org.apache.hadoop.hbase.util.ChaosMonkey.RestartRsHoldingMeta;
import org.apache.hadoop.hbase.util.ChaosMonkey.RestartRsHoldingRoot;
import org.apache.hadoop.hbase.util.ChaosMonkey.RollingBatchRestartRs;
import org.junit.After;
import org.junit.Before;
@ -51,8 +50,7 @@ public class IntegrationTestDataIngestSlowDeterministic extends IngestIntegratio
new BatchRestartRs(5000, 0.5f),
new RestartActiveMaster(5000),
new RollingBatchRestartRs(5000, 1.0f),
new RestartRsHoldingMeta(35000),
new RestartRsHoldingRoot(35000)
new RestartRsHoldingMeta(35000)
};
monkey = new ChaosMonkey(util, new ChaosMonkey.CompositeSequentialPolicy(
new ChaosMonkey.DoActionsOncePolicy(CHAOS_EVERY_MS, actions),

View File

@ -294,22 +294,6 @@ public class ChaosMonkey extends AbstractHBaseTool implements Stoppable {
}
}
public static class RestartRsHoldingRoot extends RestartRandomRs {
public RestartRsHoldingRoot(long sleepTime) {
super(sleepTime);
}
@Override
protected void perform() throws Exception {
LOG.info("Performing action: Restart region server holding ROOT");
ServerName server = cluster.getServerHoldingRoot();
if (server == null) {
LOG.warn("No server is holding -ROOT- right now.");
return;
}
restartRs(server, sleepTime);
}
}
/**
* Restarts a ratio of the running regionservers at the same time
*/
@ -659,7 +643,6 @@ public class ChaosMonkey extends AbstractHBaseTool implements Stoppable {
* - Restart random regionserver (sleep 5 sec) : 2
* - Restart random regionserver (sleep 60 sec) : 2
* - Restart META regionserver (sleep 5 sec) : 1
* - Restart ROOT regionserver (sleep 5 sec) : 1
* - Batch restart of 50% of regionservers (sleep 5 sec) : 2
* - Rolling restart of 100% of regionservers (sleep 5 sec) : 2
*/
@ -669,7 +652,6 @@ public class ChaosMonkey extends AbstractHBaseTool implements Stoppable {
new Pair<Action,Integer>(new RestartRandomRs(FIVE_SEC), 2),
new Pair<Action,Integer>(new RestartRandomRs(ONE_MIN), 2),
new Pair<Action,Integer>(new RestartRsHoldingMeta(FIVE_SEC), 1),
new Pair<Action,Integer>(new RestartRsHoldingRoot(FIVE_SEC), 1),
new Pair<Action,Integer>(new BatchRestartRs(FIVE_SEC, 0.5f), 2),
new Pair<Action,Integer>(new RollingBatchRestartRs(FIVE_SEC, 1.0f), 2)
);