HBASE-18629 Enhance ChaosMonkeyRunner with interruptibility - revert addendum

This commit is contained in:
tedyu 2017-08-21 10:01:05 -07:00
parent a5833faa89
commit 430e3e3605
1 changed files with 3 additions and 6 deletions

View File

@ -45,8 +45,6 @@ public class ChaosMonkeyRunner extends AbstractHBaseTool {
public static final String TABLE_NAME_OPT = "tableName"; public static final String TABLE_NAME_OPT = "tableName";
public static final String FAMILY_NAME_OPT = "familyName"; public static final String FAMILY_NAME_OPT = "familyName";
private static ChaosMonkeyRunner runner;
protected IntegrationTestingUtility util; protected IntegrationTestingUtility util;
protected ChaosMonkey monkey; protected ChaosMonkey monkey;
protected String monkeyToUse; protected String monkeyToUse;
@ -101,8 +99,8 @@ public class ChaosMonkeyRunner extends AbstractHBaseTool {
return 0; return 0;
} }
public static void stopRunner() { public void stopRunner() {
runner.stop = true; stop = true;
} }
public void setUpCluster() throws Exception { public void setUpCluster() throws Exception {
@ -178,8 +176,7 @@ public class ChaosMonkeyRunner extends AbstractHBaseTool {
System.arraycopy(args, 2, actualArgs, 0, argCount); System.arraycopy(args, 2, actualArgs, 0, argCount);
} }
IntegrationTestingUtility.setUseDistributedCluster(conf); IntegrationTestingUtility.setUseDistributedCluster(conf);
runner = new ChaosMonkeyRunner(); int ret = ToolRunner.run(conf, new ChaosMonkeyRunner(), actualArgs);
int ret = ToolRunner.run(conf, runner, actualArgs);
System.exit(ret); System.exit(ret);
} }