HBASE-20397 Make it more explicit that monkey.properties is found on CLASSPATH
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/2912c953 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/2912c953 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/2912c953 Branch: refs/heads/HBASE-19064 Commit: 2912c953551bedbfbf30c32c156ed7bb187d54c3 Parents: d14a7ff Author: Michael Stack <st...@apache.org> Authored: Thu Apr 12 04:36:36 2018 -0700 Committer: Michael Stack <st...@apache.org> Committed: Thu Apr 12 04:36:36 2018 -0700 ---------------------------------------------------------------------- .../java/org/apache/hadoop/hbase/IntegrationTestBase.java | 2 +- src/main/asciidoc/_chapters/developer.adoc | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/2912c953/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestBase.java ---------------------------------------------------------------------- diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestBase.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestBase.java index ee94078..125b7ca 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestBase.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestBase.java @@ -100,7 +100,7 @@ public abstract class IntegrationTestBase extends AbstractHBaseTool { monkeyProps.load(this.getClass().getClassLoader() .getResourceAsStream(chaosMonkeyPropsFile)); } catch (IOException e) { - LOG.warn(e.toString(), e); + LOG.warn("Failed load of monkey properties {} from CLASSPATH", chaosMonkeyPropsFile, e); System.exit(EXIT_FAILURE); } } http://git-wip-us.apache.org/repos/asf/hbase/blob/2912c953/src/main/asciidoc/_chapters/developer.adoc ---------------------------------------------------------------------- diff --git a/src/main/asciidoc/_chapters/developer.adoc b/src/main/asciidoc/_chapters/developer.adoc index a6e9c3e..48dc79e 100644 --- a/src/main/asciidoc/_chapters/developer.adoc +++ b/src/main/asciidoc/_chapters/developer.adoc @@ -1465,9 +1465,8 @@ HBase ships with several ChaosMonkey policies, available in the [[chaos.monkey.properties]] ==== Configuring Individual ChaosMonkey Actions -Since HBase version 1.0.0 (link:https://issues.apache.org/jira/browse/HBASE-11348[HBASE-11348]), ChaosMonkey integration tests can be configured per test run. -Create a Java properties file in the HBase classpath and pass it to ChaosMonkey using +Create a Java properties file in the HBase CLASSPATH and pass it to ChaosMonkey using the `-monkeyProps` configuration flag. Configurable properties, along with their default values if applicable, are listed in the `org.apache.hadoop.hbase.chaos.factories.MonkeyConstants` class. For properties that have defaults, you can override them by including them @@ -1480,7 +1479,9 @@ The following example uses a properties file called <<monkey.properties,monkey.p $ bin/hbase org.apache.hadoop.hbase.IntegrationTestIngest -m slowDeterministic -monkeyProps monkey.properties ---- -The above command will start the integration tests and chaos monkey passing the properties file _monkey.properties_. +The above command will start the integration tests and chaos monkey. It will look for the +properties file _monkey.properties_ on the HBase CLASSPATH; e.g. inside the HBASE _conf_ dir. + Here is an example chaos monkey file: [[monkey.properties]] @@ -1495,6 +1496,8 @@ move.regions.sleep.time=80000 batch.restart.rs.ratio=0.4f ---- +Periods/time are expressed in milliseconds. + HBase 1.0.2 and newer adds the ability to restart HBase's underlying ZooKeeper quorum or HDFS nodes. To use these actions, you need to configure some new properties, which have no reasonable defaults because they are deployment-specific, in your ChaosMonkey