Apache Lucene open-source search software
test-related: move constructors together, log core container creation for all
Yonik Seeley80f95a16e055
diff --git a/solr/src/java/org/apache/solr/core/CoreContainer.java b/solr/src/java/org/apache/solr/core/CoreContainer.javaindex 784c76dce9c..39ed2e3990d 100644--- a/solr/src/java/org/apache/solr/core/CoreContainer.java+++ b/solr/src/java/org/apache/solr/core/CoreContainer.java@@ -85,12 +85,42 @@ public class CoreContainerprivate SolrZkServer zkServer;private String zkHost;-++ {+ log.info("New CoreContainer: solrHome=" + solrHome + " instance="+System.identityHashCode(this));+ }+public CoreContainer() {solrHome = SolrResourceLoader.locateSolrHome();- log.info("New CoreContainer: solrHome=" + solrHome + " instance="+System.identityHashCode(this));}-++ /**+ * 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 ZooKeeperString zookeeperHost;@@ -245,32 +275,7 @@ public class CoreContainerreturn 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