public class MiniSolrCloudCluster extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_CLOUD_SOLR_XML |
| Constructor and Description |
|---|
MiniSolrCloudCluster(int numServers,
Path baseDir,
String solrXml,
org.apache.solr.client.solrj.embedded.JettyConfig jettyConfig)
Create a MiniSolrCloudCluster
|
MiniSolrCloudCluster(int numServers,
Path baseDir,
String solrXml,
org.apache.solr.client.solrj.embedded.JettyConfig jettyConfig,
ZkTestServer zkTestServer) |
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,
Path baseDir,
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,
Path baseDir,
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,
Path baseDir,
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
|
MiniSolrCloudCluster(int numServers,
String hostContext,
Path baseDir,
String 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 |
|---|---|
org.apache.solr.common.util.NamedList<Object> |
createCollection(String name,
int numShards,
int replicationFactor,
String configName,
Map<String,String> collectionProperties) |
org.apache.solr.common.util.NamedList<Object> |
createCollection(String name,
int numShards,
int replicationFactor,
String configName,
String createNodeSet,
Map<String,String> collectionProperties) |
org.apache.solr.common.util.NamedList<Object> |
deleteCollection(String name) |
List<org.apache.solr.client.solrj.embedded.JettySolrRunner> |
getJettySolrRunners() |
org.apache.solr.client.solrj.embedded.JettySolrRunner |
getRandomJetty(Random random) |
org.apache.solr.client.solrj.embedded.JettySolrRunner |
getReplicaJetty(org.apache.solr.common.cloud.Replica replica)
Return the jetty that a particular replica resides on
|
org.apache.solr.client.solrj.impl.CloudSolrServer |
getSolrClient() |
ZkTestServer |
getZkServer() |
void |
init(int numServers,
String hostContext,
byte[] solrXml,
SortedMap<org.eclipse.jetty.servlet.ServletHolder,String> extraServlets,
SortedMap<Class,String> extraRequestFilters,
org.apache.solr.client.solrj.embedded.SSLConfig sslConfig,
ZkTestServer zkTestServer) |
String |
newNodeName() |
void |
shutdown()
Shut down the cluster, including all Solr nodes and ZooKeeper
|
org.apache.solr.client.solrj.embedded.JettySolrRunner |
startJettySolrRunner(String name,
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 name,
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 static final String DEFAULT_CLOUD_SOLR_XML
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,
Path baseDir,
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,
Path baseDir,
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,
Path baseDir,
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 MiniSolrCloudCluster(int numServers,
Path baseDir,
String solrXml,
org.apache.solr.client.solrj.embedded.JettyConfig jettyConfig)
throws Exception
numServers - number of Solr servers to startsolrXml - solr.xml file to be uploaded to ZooKeeperjettyConfig - Jetty configurationException - if there was an error starting the clusterpublic MiniSolrCloudCluster(int numServers,
Path baseDir,
String solrXml,
org.apache.solr.client.solrj.embedded.JettyConfig jettyConfig,
ZkTestServer zkTestServer)
throws Exception
Exceptionpublic MiniSolrCloudCluster(int numServers,
String hostContext,
Path baseDir,
String 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 void init(int numServers,
String hostContext,
byte[] 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
Exceptionpublic String newNodeName()
public ZkTestServer getZkServer()
public List<org.apache.solr.client.solrj.embedded.JettySolrRunner> getJettySolrRunners()
public org.apache.solr.client.solrj.embedded.JettySolrRunner startJettySolrRunner(String name, 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 name, 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.KeeperExceptionInterruptedExceptionpublic org.apache.solr.client.solrj.impl.CloudSolrServer getSolrClient()
public org.apache.solr.common.util.NamedList<Object> createCollection(String name, int numShards, int replicationFactor, String configName, Map<String,String> collectionProperties) throws org.apache.solr.client.solrj.SolrServerException, IOException
org.apache.solr.client.solrj.SolrServerExceptionIOExceptionpublic org.apache.solr.common.util.NamedList<Object> createCollection(String name, int numShards, int replicationFactor, String configName, String createNodeSet, Map<String,String> collectionProperties) throws org.apache.solr.client.solrj.SolrServerException, IOException
org.apache.solr.client.solrj.SolrServerExceptionIOExceptionpublic org.apache.solr.common.util.NamedList<Object> deleteCollection(String name) throws org.apache.solr.client.solrj.SolrServerException, IOException
org.apache.solr.client.solrj.SolrServerExceptionIOExceptionpublic void shutdown()
throws Exception
Exceptionpublic org.apache.solr.client.solrj.embedded.JettySolrRunner getReplicaJetty(org.apache.solr.common.cloud.Replica replica)
public org.apache.solr.client.solrj.embedded.JettySolrRunner getRandomJetty(Random random)
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.