Package org.apache.solr.cloud
Class SolrCloudTestCase.Builder
- java.lang.Object
-
- org.apache.solr.cloud.SolrCloudTestCase.Builder
-
- Enclosing class:
- SolrCloudTestCase
public static class SolrCloudTestCase.Builder extends Object
Builder class for a MiniSolrCloudCluster
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SolrCloudTestCase.BuilderaddConfig(String configName, Path configPath)Upload a collection config before tests startMiniSolrCloudClusterbuild()Configure, run and return theMiniSolrCloudClustervoidconfigure()Configure and run theMiniSolrCloudClusterSolrCloudTestCase.BuilderwithJettyConfig(org.apache.solr.client.solrj.embedded.JettyConfig jettyConfig)Use aJettyConfigto configure the cluster's jetty serversSolrCloudTestCase.BuilderwithProperty(String propertyName, String propertyValue)Set a cluster propertySolrCloudTestCase.BuilderwithSecurityJson(String securityJson)Configure the specified security.json for the MiniSolrCloudClusterSolrCloudTestCase.BuilderwithSecurityJson(Path securityJson)Configure the specified security.json for the MiniSolrCloudClusterSolrCloudTestCase.BuilderwithSolrXml(String solrXml)Use the provided string as solr.xml contentSolrCloudTestCase.BuilderwithSolrXml(Path solrXml)Read solr.xml from the provided path
-
-
-
Constructor Detail
-
Builder
public Builder(int nodeCount, Path baseDir)Create a builder- Parameters:
nodeCount- the number of nodes in the clusterbaseDir- a base directory for the cluster
-
-
Method Detail
-
withJettyConfig
public SolrCloudTestCase.Builder withJettyConfig(org.apache.solr.client.solrj.embedded.JettyConfig jettyConfig)
Use aJettyConfigto configure the cluster's jetty servers
-
withSolrXml
public SolrCloudTestCase.Builder withSolrXml(String solrXml)
Use the provided string as solr.xml content
-
withSolrXml
public SolrCloudTestCase.Builder withSolrXml(Path solrXml)
Read solr.xml from the provided path
-
withSecurityJson
public SolrCloudTestCase.Builder withSecurityJson(Path securityJson)
Configure the specified security.json for the MiniSolrCloudCluster- Parameters:
securityJson- The path specifying the security.json file- Returns:
- the instance of SolrCloudTestCase.Builder
-
withSecurityJson
public SolrCloudTestCase.Builder withSecurityJson(String securityJson)
Configure the specified security.json for the MiniSolrCloudCluster- Parameters:
securityJson- The string specifying the security.json configuration- Returns:
- the instance of SolrCloudTestCase.Builder
-
addConfig
public SolrCloudTestCase.Builder addConfig(String configName, Path configPath)
Upload a collection config before tests start- Parameters:
configName- the config nameconfigPath- the path to the config files
-
withProperty
public SolrCloudTestCase.Builder withProperty(String propertyName, String propertyValue)
Set a cluster property- Parameters:
propertyName- the property namepropertyValue- the property value
-
configure
public void configure() throws ExceptionConfigure and run theMiniSolrCloudCluster- Throws:
Exception- if an error occurs on startup
-
build
public MiniSolrCloudCluster build() throws Exception
Configure, run and return theMiniSolrCloudCluster- Throws:
Exception- if an error occurs on startup
-
-