hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-18629 Enhance ChaosMonkeyRunner with interruptibility - addendum makes stopRunner() static
Date Mon, 21 Aug 2017 16:38:03 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-2 7fef60634 -> a5833faa8


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/a5833faa
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/a5833faa
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/a5833faa

Branch: refs/heads/branch-2
Commit: a5833faa895dcf249eb25b9727ad145c32483beb
Parents: 7fef606
Author: tedyu <yuzhihong@gmail.com>
Authored: Mon Aug 21 09:37:57 2017 -0700
Committer: tedyu <yuzhihong@gmail.com>
Committed: Mon Aug 21 09:37:57 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/a5833faa/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