test-related: move constructors together, log core container creation for all

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1023545 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2010-10-17 18:25:04 +00:00
parent 87489d797c
commit 80f95a16e0
1 changed files with 34 additions and 29 deletions

View File

@ -85,12 +85,42 @@ public class CoreContainer
private SolrZkServer zkServer;
private String zkHost;
public CoreContainer() {
solrHome = SolrResourceLoader.locateSolrHome();
{
log.info("New CoreContainer: solrHome=" + solrHome + " instance="+System.identityHashCode(this));
}
public CoreContainer() {
solrHome = SolrResourceLoader.locateSolrHome();
}
/**
* Initalize CoreContainer directly from the constructor
*
* @param dir
* @param configFile
* @throws ParserConfigurationException
* @throws IOException
* @throws SAXException
*/
public CoreContainer(String dir, File configFile) throws ParserConfigurationException, IOException, SAXException
{
this.load(dir, configFile);
}
/**
* Minimal CoreContainer constructor.
* @param loader the CoreContainer resource loader
*/
public CoreContainer(SolrResourceLoader loader) {
this.loader = loader;
this.solrHome = loader.getInstanceDir();
}
public CoreContainer(String solrHome) {
this.solrHome = solrHome;
}
private void initZooKeeper(String zkHost, int zkClientTimeout) {
// if zkHost sys property is not set, we are not using ZooKeeper
String zookeeperHost;
@ -245,32 +275,7 @@ public class CoreContainer
return p;
}
/**
* Initalize CoreContainer directly from the constructor
*
* @param dir
* @param configFile
* @throws ParserConfigurationException
* @throws IOException
* @throws SAXException
*/
public CoreContainer(String dir, File configFile) throws ParserConfigurationException, IOException, SAXException
{
this.load(dir, configFile);
}
/**
* Minimal CoreContainer constructor.
* @param loader the CoreContainer resource loader
*/
public CoreContainer(SolrResourceLoader loader) {
this.loader = loader;
this.solrHome = loader.getInstanceDir();
}
public CoreContainer(String solrHome) {
this.solrHome = solrHome;
}
//-------------------------------------------------------------------
// Initialization / Cleanup