public class SimScenario extends Object implements AutoCloseable
Modifier and Type | Class and Description |
---|---|
static class |
SimScenario.AddNodes
Add one or more nodes.
|
static class |
SimScenario.ApplySuggestions
Apply autoscaling suggestions.
|
static class |
SimScenario.Assert |
static class |
SimScenario.CalculateSuggestions
Calculate autoscaling suggestions.
|
static class |
SimScenario.Condition |
static class |
SimScenario.CreateCluster
Create a simulated cluster.
|
static class |
SimScenario.CtxRemove
Remove a context property.
|
static class |
SimScenario.CtxSet
Set a context property.
|
static class |
SimScenario.Dump
Dump the simulator state to the console.
|
static class |
SimScenario.IndexDocs |
static class |
SimScenario.KillNodes
Kill one or more nodes.
|
static class |
SimScenario.LoadAutoscaling
Load autoscaling.json configuration.
|
static class |
SimScenario.LoadSnapshot
Create a simulated cluster from an autoscaling snapshot.
|
static class |
SimScenario.LoopOp
Loop action.
|
static class |
SimScenario.RunSimulator
Run the simulator for a while.
|
static class |
SimScenario.RunSolrRequest
Execute a SolrRequest supported by
SimCloudManager . |
static class |
SimScenario.SaveSnapshot
Save an autoscaling snapshot.
|
static class |
SimScenario.SetEventListener
Set a temporary listener to wait for a specific trigger event processing.
|
static class |
SimScenario.SetNodeMetrics |
static class |
SimScenario.SetOpDelays
Set delays for specified collection operations in order to simulate slow execution.
|
static class |
SimScenario.SetShardMetrics |
static class |
SimScenario.SimAction
Actions supported by the scenario.
|
static class |
SimScenario.SimOp
Base class for implementation of scenario DSL actions.
|
static class |
SimScenario.WaitCollection
Wait for a specific collection shape.
|
static class |
SimScenario.WaitEvent
Wait for the previously set listener to capture an event.
|
Modifier and Type | Field and Description |
---|---|
boolean |
abortLoop |
boolean |
abortScenario |
SimCloudManager |
cluster |
static String |
COLLECTIONS_CTX_PROP
Context variable: List of collections.
|
AutoScalingConfig |
config |
PrintStream |
console |
Map<String,Object> |
context |
static String |
LIVE_NODES_CTX_PROP
Context variable: List of live nodes.
|
static String |
LOOP_ITER_PROP
Context variable: Current loop iteration or none if outside of loop.
|
List<SimScenario.SimOp> |
ops |
static String |
OVERSEER_LEADER_CTX_PROP
Context variable: Node name of the current Overseer leader.
|
static String |
RANDOM_NODE_CTX_PROP
Context variable: Random live node name.
|
static String |
RESPONSES_CTX_PROP
Context variable: List of SolrResponses of SOLR_REQUEST operations.
|
static Map<SimScenario.SimAction,Class<? extends SimScenario.SimOp>> |
simOps |
static String |
SUGGESTIONS_CTX_PROP
Context variable: List of calculated suggestions.
|
static String |
TRIGGER_EVENT_PREFIX
Last trigger event captured by WAIT_EVENT.
|
boolean |
verbose |
Constructor and Description |
---|
SimScenario() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
static SimScenario |
load(String data)
Parse a DSL string and create a scenario ready to run.
|
void |
run()
Run the scenario.
|
public static final String RANDOM_NODE_CTX_PROP
public static final String OVERSEER_LEADER_CTX_PROP
public static final String LIVE_NODES_CTX_PROP
public static final String COLLECTIONS_CTX_PROP
public static final String SUGGESTIONS_CTX_PROP
public static final String RESPONSES_CTX_PROP
public static final String LOOP_ITER_PROP
public static final String TRIGGER_EVENT_PREFIX
public SimCloudManager cluster
public AutoScalingConfig config
public List<SimScenario.SimOp> ops
public PrintStream console
public boolean verbose
public boolean abortLoop
public boolean abortScenario
public static Map<SimScenario.SimAction,Class<? extends SimScenario.SimOp>> simOps
public static SimScenario load(String data) throws Exception
data
- DSL string with commands and parametersException
- on syntax errorspublic void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.