public class MiniSolrCloudCluster extends Object
| Constructor and Description |
|---|
MiniSolrCloudCluster(int numServers,
String hostContext,
File solrXml,
SortedMap<org.eclipse.jetty.servlet.ServletHolder,String> extraServlets,
SortedMap<Class,String> extraRequestFilters)
"Mini" SolrCloud cluster to be used for testing
|
MiniSolrCloudCluster(int numServers,
String hostContext,
File solrXml,
SortedMap<org.eclipse.jetty.servlet.ServletHolder,String> extraServlets,
SortedMap<Class,String> extraRequestFilters,
org.apache.solr.client.solrj.embedded.SSLConfig sslConfig)
"Mini" SolrCloud cluster to be used for testing
|
MiniSolrCloudCluster(int numServers,
String hostContext,
File solrXml,
SortedMap<org.eclipse.jetty.servlet.ServletHolder,String> extraServlets,
SortedMap<Class,String> extraRequestFilters,
org.apache.solr.client.solrj.embedded.SSLConfig sslConfig,
ZkTestServer zkTestServer)
"Mini" SolrCloud cluster to be used for testing
|
| Modifier and Type | Method and Description |
|---|---|
List<org.apache.solr.client.solrj.embedded.JettySolrRunner> |
getJettySolrRunners() |
ZkTestServer |
getZkServer() |
void |
shutdown()
Shut down the cluster, including all Solr nodes and ZooKeeper
|
org.apache.solr.client.solrj.embedded.JettySolrRunner |
startJettySolrRunner(String hostContext,
SortedMap<org.eclipse.jetty.servlet.ServletHolder,String> extraServlets,
SortedMap<Class,String> extraRequestFilters)
Start a new Solr instance
|
org.apache.solr.client.solrj.embedded.JettySolrRunner |
startJettySolrRunner(String hostContext,
SortedMap<org.eclipse.jetty.servlet.ServletHolder,String> extraServlets,
SortedMap<Class,String> extraRequestFilters,
org.apache.solr.client.solrj.embedded.SSLConfig sslConfig)
Start a new Solr instance
|
org.apache.solr.client.solrj.embedded.JettySolrRunner |
stopJettySolrRunner(int index)
Stop a Solr instance
|
void |
uploadConfigDir(File configDir,
String configName) |
public MiniSolrCloudCluster(int numServers,
String hostContext,
File solrXml,
SortedMap<org.eclipse.jetty.servlet.ServletHolder,String> extraServlets,
SortedMap<Class,String> extraRequestFilters)
throws Exception
numServers - number of Solr servers to starthostContext - context path of Solr servers used by JettysolrXml - solr.xml file to be uploaded to ZooKeeperextraServlets - Extra servlets to be started by JettyextraRequestFilters - extra filters to be started by JettyExceptionpublic MiniSolrCloudCluster(int numServers,
String hostContext,
File solrXml,
SortedMap<org.eclipse.jetty.servlet.ServletHolder,String> extraServlets,
SortedMap<Class,String> extraRequestFilters,
org.apache.solr.client.solrj.embedded.SSLConfig sslConfig)
throws Exception
numServers - number of Solr servers to starthostContext - context path of Solr servers used by JettysolrXml - solr.xml file to be uploaded to ZooKeeperextraServlets - Extra servlets to be started by JettyextraRequestFilters - extra filters to be started by JettysslConfig - SSL configurationExceptionpublic MiniSolrCloudCluster(int numServers,
String hostContext,
File solrXml,
SortedMap<org.eclipse.jetty.servlet.ServletHolder,String> extraServlets,
SortedMap<Class,String> extraRequestFilters,
org.apache.solr.client.solrj.embedded.SSLConfig sslConfig,
ZkTestServer zkTestServer)
throws Exception
numServers - number of Solr servers to starthostContext - context path of Solr servers used by JettysolrXml - solr.xml file to be uploaded to ZooKeeperextraServlets - Extra servlets to be started by JettyextraRequestFilters - extra filters to be started by JettysslConfig - SSL configurationzkTestServer - ZkTestServer to use. If null, one will be createdExceptionpublic ZkTestServer getZkServer()
public List<org.apache.solr.client.solrj.embedded.JettySolrRunner> getJettySolrRunners()
public org.apache.solr.client.solrj.embedded.JettySolrRunner startJettySolrRunner(String hostContext, SortedMap<org.eclipse.jetty.servlet.ServletHolder,String> extraServlets, SortedMap<Class,String> extraRequestFilters) throws Exception
hostContext - context path of Solr servers used by JettyextraServlets - Extra servlets to be started by JettyextraRequestFilters - extra filters to be started by JettyExceptionpublic org.apache.solr.client.solrj.embedded.JettySolrRunner startJettySolrRunner(String hostContext, SortedMap<org.eclipse.jetty.servlet.ServletHolder,String> extraServlets, SortedMap<Class,String> extraRequestFilters, org.apache.solr.client.solrj.embedded.SSLConfig sslConfig) throws Exception
hostContext - context path of Solr servers used by JettyextraServlets - Extra servlets to be started by JettyextraRequestFilters - extra filters to be started by JettysslConfig - SSL configurationExceptionpublic org.apache.solr.client.solrj.embedded.JettySolrRunner stopJettySolrRunner(int index)
throws Exception
index - the index of node in collection returned by getJettySolrRunners()Exceptionpublic void uploadConfigDir(File configDir, String configName) throws IOException, org.apache.zookeeper.KeeperException, InterruptedException
IOExceptionorg.apache.zookeeper.KeeperExceptionInterruptedExceptionCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.