Class PeriodicRandomActionPolicy
java.lang.Object
org.apache.hadoop.hbase.util.StoppableImplementation
org.apache.hadoop.hbase.chaos.policies.Policy
org.apache.hadoop.hbase.chaos.policies.PeriodicPolicy
org.apache.hadoop.hbase.chaos.policies.PeriodicRandomActionPolicy
- All Implemented Interfaces:
Runnable
,org.apache.hadoop.hbase.Stoppable
A policy, which picks a random action according to the given weights, and performs it every
configurable period.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.chaos.policies.Policy
Policy.PolicyContext
-
Field Summary
Modifier and TypeFieldDescription -
Constructor Summary
ConstructorDescriptionPeriodicRandomActionPolicy
(long periodMs, List<org.apache.hadoop.hbase.util.Pair<Action, Integer>> actions) PeriodicRandomActionPolicy
(long periodMs, Action... actions) PeriodicRandomActionPolicy
(long periodMs, org.apache.hadoop.hbase.util.Pair<Action, Integer>... actions) -
Method Summary
Methods inherited from class org.apache.hadoop.hbase.chaos.policies.PeriodicPolicy
run
Methods inherited from class org.apache.hadoop.hbase.util.StoppableImplementation
isStopped, stop
-
Field Details
-
actions
-
-
Constructor Details
-
PeriodicRandomActionPolicy
public PeriodicRandomActionPolicy(long periodMs, List<org.apache.hadoop.hbase.util.Pair<Action, Integer>> actions) -
PeriodicRandomActionPolicy
public PeriodicRandomActionPolicy(long periodMs, org.apache.hadoop.hbase.util.Pair<Action, Integer>... actions) -
PeriodicRandomActionPolicy
-
-
Method Details
-
runOneIteration
- Specified by:
runOneIteration
in classPeriodicPolicy
-
init
- Overrides:
init
in classPeriodicPolicy
- Throws:
Exception
-