HBASE-8924 Master Can fail to come up after chaos monkey if the sleep time is too short.
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1502144 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f92be02b93
commit
b33d113a64
|
@ -172,8 +172,8 @@ public class IntegrationTestMTTR {
|
|||
// Set up the action that will move the regions of our table.
|
||||
moveRegionAction = new ChaosMonkey.MoveRegionsOfTable(SLEEP_TIME, tableName);
|
||||
|
||||
// Kill the master (No sleep time because there is only one master running at this time.)
|
||||
restartMasterAction = new ChaosMonkey.RestartActiveMaster(0l);
|
||||
// Kill the master
|
||||
restartMasterAction = new ChaosMonkey.RestartActiveMaster(1000);
|
||||
|
||||
// Give the action the access to the cluster.
|
||||
ChaosMonkey.ActionContext actionContext = new ChaosMonkey.ActionContext(util);
|
||||
|
|
|
@ -239,12 +239,14 @@ public class ChaosMonkey extends AbstractHBaseTool implements Stoppable {
|
|||
}
|
||||
|
||||
void restartMaster(ServerName server, long sleepTime) throws IOException {
|
||||
sleepTime = Math.max(sleepTime, 1000);
|
||||
killMaster(server);
|
||||
sleep(sleepTime);
|
||||
startMaster(server);
|
||||
}
|
||||
|
||||
void restartRs(ServerName server, long sleepTime) throws IOException {
|
||||
sleepTime = Math.max(sleepTime, 1000);
|
||||
killRs(server);
|
||||
sleep(sleepTime);
|
||||
startRs(server);
|
||||
|
|
Loading…
Reference in New Issue