public static class SolrCloudTestCase.Builder extends Object
Constructor and Description |
---|
Builder(int nodeCount,
Path baseDir)
Create a builder
|
Modifier and Type | Method and Description |
---|---|
SolrCloudTestCase.Builder |
addConfig(String configName,
Path configPath)
Upload a collection config before tests start
|
MiniSolrCloudCluster |
build()
Configure, run and return the
MiniSolrCloudCluster |
void |
configure()
Configure and run the
MiniSolrCloudCluster |
SolrCloudTestCase.Builder |
withDefaultClusterProperty(String key,
String value) |
SolrCloudTestCase.Builder |
withJettyConfig(org.apache.solr.client.solrj.embedded.JettyConfig jettyConfig)
Use a
JettyConfig to configure the cluster's jetty servers |
SolrCloudTestCase.Builder |
withMetrics(boolean trackJettyMetrics) |
SolrCloudTestCase.Builder |
withProperty(String propertyName,
String propertyValue)
Set a cluster property
|
SolrCloudTestCase.Builder |
withSecurityJson(Path securityJson)
Configure the specified security.json for the MiniSolrCloudCluster
|
SolrCloudTestCase.Builder |
withSecurityJson(String securityJson)
Configure the specified security.json for the MiniSolrCloudCluster
|
SolrCloudTestCase.Builder |
withSolrXml(Path solrXml)
Read solr.xml from the provided path
|
SolrCloudTestCase.Builder |
withSolrXml(String solrXml)
Use the provided string as solr.xml content
|
public Builder(int nodeCount, Path baseDir)
nodeCount
- the number of nodes in the clusterbaseDir
- a base directory for the clusterpublic SolrCloudTestCase.Builder withJettyConfig(org.apache.solr.client.solrj.embedded.JettyConfig jettyConfig)
JettyConfig
to configure the cluster's jetty serverspublic SolrCloudTestCase.Builder withSolrXml(String solrXml)
public SolrCloudTestCase.Builder withSolrXml(Path solrXml)
public SolrCloudTestCase.Builder withSecurityJson(Path securityJson)
securityJson
- The path specifying the security.json filepublic SolrCloudTestCase.Builder withSecurityJson(String securityJson)
securityJson
- The string specifying the security.json configurationpublic SolrCloudTestCase.Builder addConfig(String configName, Path configPath)
configName
- the config nameconfigPath
- the path to the config filespublic SolrCloudTestCase.Builder withProperty(String propertyName, String propertyValue)
propertyName
- the property namepropertyValue
- the property valuepublic SolrCloudTestCase.Builder withMetrics(boolean trackJettyMetrics)
public void configure() throws Exception
MiniSolrCloudCluster
Exception
- if an error occurs on startuppublic MiniSolrCloudCluster build() throws Exception
MiniSolrCloudCluster
Exception
- if an error occurs on startuppublic SolrCloudTestCase.Builder withDefaultClusterProperty(String key, String value)
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.