Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 327F5200D0C for ; Tue, 22 Aug 2017 08:13:03 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 311CD166289; Tue, 22 Aug 2017 06:13:03 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7D63B166256 for ; Tue, 22 Aug 2017 08:13:02 +0200 (CEST) Received: (qmail 30965 invoked by uid 500); 22 Aug 2017 06:13:01 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 30939 invoked by uid 99); 22 Aug 2017 06:13:01 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Aug 2017 06:13:01 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C8B4DF556E; Tue, 22 Aug 2017 06:13:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: busbey@apache.org To: commits@hbase.apache.org Date: Tue, 22 Aug 2017 06:13:02 -0000 Message-Id: <7eba04bc709f42ffb7243c44cb20629a@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [03/11] hbase git commit: HBASE-18629 Enhance ChaosMonkeyRunner with interruptibility - addendum makes stopRunner() static archived-at: Tue, 22 Aug 2017 06:13:03 -0000 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-18467 Commit: fef7e8f7e8242b87f6e1c6b4b8df440af8ca6da5 Parents: 70d48b1 Author: tedyu Authored: Mon Aug 21 09:37:30 2017 -0700 Committer: tedyu 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); }