public abstract class ChaosMonkey extends Object implements org.apache.hadoop.hbase.Stoppable
ChaosMonkey defines Action's and Policy's. Actions are sequences of events, like - Select a random server to kill - Sleep for 5 sec - Start the server on the same host Actions can also be complex events, like rolling restart of all of the servers.
Policies on the other hand are responsible for executing the actions based on a strategy. The default policy is to execute a random action every minute based on predefined action weights. ChaosMonkey executes predefined named policies until it is stopped. More than one policy can be active at any time.
Chaos monkey can be run from the command line, or can be invoked from integration tests.
See IntegrationTestIngest
or other integration tests that use
chaos monkey for code examples.
ChaosMonkey class is indeed inspired by the Netflix's same-named tool: http://techblog.netflix.com/2012/07/chaos-monkey-released-into-wild.html
Constructor and Description |
---|
ChaosMonkey() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
isDestructive()
Returns whether the CM does destructive actions (killing servers) so that a cluster restore
is needed after CM is stopped.
|
abstract boolean |
isStopped() |
abstract void |
start() |
abstract void |
stop(String why) |
abstract void |
waitForStop() |
public ChaosMonkey()
public abstract void stop(String why)
stop
in interface org.apache.hadoop.hbase.Stoppable
public abstract boolean isStopped()
isStopped
in interface org.apache.hadoop.hbase.Stoppable
public abstract void waitForStop() throws InterruptedException
InterruptedException
public abstract boolean isDestructive()
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.