hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [12/21] hbase git commit: HBASE-18629 Enhance ChaosMonkeyRunner with interruptibility - addendum makes stopRunner() static
Date Tue, 22 Aug 2017 16:02:59 GMT
HBASE-18629 Enhance ChaosMonkeyRunner with interruptibility - addendum makes stopRunner() static


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/fef7e8f7
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/fef7e8f7
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/fef7e8f7

Branch: refs/heads/HBASE-14070.HLC
Commit: fef7e8f7e8242b87f6e1c6b4b8df440af8ca6da5
Parents: 70d48b1
Author: tedyu <yuzhihong@gmail.com>
Authored: Mon Aug 21 09:37:30 2017 -0700
Committer: tedyu <yuzhihong@gmail.com>
Committed: Mon Aug 21 09:37:30 2017 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hbase/chaos/util/ChaosMonkeyRunner.java   | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/fef7e8f7/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/util/ChaosMonkeyRunner.java
----------------------------------------------------------------------
diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/util/ChaosMonkeyRunner.java
b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/util/ChaosMonkeyRunner.java
index f142321..80f99e5 100644
--- a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/util/ChaosMonkeyRunner.java
+++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/util/ChaosMonkeyRunner.java
@@ -45,6 +45,8 @@ public class ChaosMonkeyRunner extends AbstractHBaseTool {
   public static final String TABLE_NAME_OPT = "tableName";
   public static final String FAMILY_NAME_OPT = "familyName";
 
+  private static ChaosMonkeyRunner runner;
+
   protected IntegrationTestingUtility util;
   protected ChaosMonkey monkey;
   protected String monkeyToUse;
@@ -99,8 +101,8 @@ public class ChaosMonkeyRunner extends AbstractHBaseTool {
     return 0;
   }
 
-  public void stopRunner() {
-    stop = true;
+  public static void stopRunner() {
+    runner.stop = true;
   }
 
   public void setUpCluster() throws Exception {
@@ -176,7 +178,8 @@ public class ChaosMonkeyRunner extends AbstractHBaseTool {
       System.arraycopy(args, 2, actualArgs, 0, argCount);
     }
     IntegrationTestingUtility.setUseDistributedCluster(conf);
-    int ret = ToolRunner.run(conf, new ChaosMonkeyRunner(), actualArgs);
+    runner = new ChaosMonkeyRunner();
+    int ret = ToolRunner.run(conf, runner, actualArgs);
     System.exit(ret);
   }
 


Mime
View raw message