Package org.apache.solr.bench
Class MiniClusterState.MiniClusterBenchState
- java.lang.Object
-
- org.apache.solr.bench.MiniClusterState.MiniClusterBenchState
-
- Enclosing class:
- MiniClusterState
public static class MiniClusterState.MiniClusterBenchState extends Object
The type Mini cluster bench state.
-
-
Field Summary
Fields Modifier and Type Field Description SolrClientclientThe Client.List<String>nodesThe Nodes.
-
Constructor Summary
Constructors Constructor Description MiniClusterBenchState()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckWarmUp(org.openjdk.jmh.infra.Control control)Check warm up.voidcreateCollection(String collection, int numShards, int numReplicas)Create collection.voiddoSetup(org.openjdk.jmh.infra.BenchmarkParams benchmarkParams, BaseBenchState baseBenchState)Do setup.voiddumpCoreInfo()Dump core info.voidforceMerge(String collection, int maxMergeSegments)Force merge.SplittableRandomgetRandom()Gets random.voidindex(String collection, Docs docs, int docCount)Index.voidmetricsEnabled(boolean metricsEnabled)Metrics enabled.voidshutdownMiniCluster(org.openjdk.jmh.infra.BenchmarkParams benchmarkParams, BaseBenchState baseBenchState)Shutdown mini cluster.voidstartMiniCluster(int nodeCount)Start mini cluster.voidtearDown(org.openjdk.jmh.infra.BenchmarkParams benchmarkParams)Tear down.voidwaitForMerges(String collection)Wait for merges.
-
-
-
Field Detail
-
client
public SolrClient client
The Client.
-
-
Method Detail
-
tearDown
public void tearDown(org.openjdk.jmh.infra.BenchmarkParams benchmarkParams) throws ExceptionTear down.- Parameters:
benchmarkParams- the benchmark params- Throws:
Exception- the exception
-
checkWarmUp
public void checkWarmUp(org.openjdk.jmh.infra.Control control) throws ExceptionCheck warm up.- Parameters:
control- the control- Throws:
Exception- the exception
-
shutdownMiniCluster
public void shutdownMiniCluster(org.openjdk.jmh.infra.BenchmarkParams benchmarkParams, BaseBenchState baseBenchState) throws ExceptionShutdown mini cluster.- Parameters:
benchmarkParams- the benchmark params- Throws:
Exception- the exception
-
doSetup
public void doSetup(org.openjdk.jmh.infra.BenchmarkParams benchmarkParams, BaseBenchState baseBenchState) throws ExceptionDo setup.- Parameters:
benchmarkParams- the benchmark paramsbaseBenchState- the base bench state- Throws:
Exception- the exception
-
metricsEnabled
public void metricsEnabled(boolean metricsEnabled)
Metrics enabled.- Parameters:
metricsEnabled- the metrics enabled
-
startMiniCluster
public void startMiniCluster(int nodeCount)
Start mini cluster.- Parameters:
nodeCount- the node count
-
getRandom
public SplittableRandom getRandom()
Gets random.- Returns:
- the random
-
createCollection
public void createCollection(String collection, int numShards, int numReplicas) throws Exception
Create collection.- Parameters:
collection- the collectionnumShards- the num shardsnumReplicas- the num replicas- Throws:
Exception- the exception
-
index
public void index(String collection, Docs docs, int docCount) throws Exception
Index.- Parameters:
collection- the collectiondocs- the docsdocCount- the doc count- Throws:
Exception- the exception
-
waitForMerges
public void waitForMerges(String collection) throws Exception
Wait for merges.- Parameters:
collection- the collection- Throws:
Exception- the exception
-
forceMerge
public void forceMerge(String collection, int maxMergeSegments) throws Exception
Force merge.- Parameters:
collection- the collectionmaxMergeSegments- the max merge segments- Throws:
Exception- the exception
-
dumpCoreInfo
public void dumpCoreInfo() throws IOExceptionDump core info.- Throws:
IOException- the io exception
-
-