lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r902442 - /lucene/solr/branches/cloud/src/java/org/apache/solr/core/CoreContainer.java
Date Sat, 23 Jan 2010 16:57:59 GMT
Author: yonik
Date: Sat Jan 23 16:57:58 2010
New Revision: 902442

URL: http://svn.apache.org/viewvc?rev=902442&view=rev
Log:
fix running example w/o cloud

Modified:
    lucene/solr/branches/cloud/src/java/org/apache/solr/core/CoreContainer.java

Modified: lucene/solr/branches/cloud/src/java/org/apache/solr/core/CoreContainer.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/java/org/apache/solr/core/CoreContainer.java?rev=902442&r1=902441&r2=902442&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/java/org/apache/solr/core/CoreContainer.java (original)
+++ lucene/solr/branches/cloud/src/java/org/apache/solr/core/CoreContainer.java Sat Jan 23
16:57:58 2010
@@ -97,6 +97,10 @@
   private void initZooKeeper(String zkHost, int zkClientTimeout) {
     // nocommit: perhaps get from solr.xml
 
+    String zkRun = System.getProperty("zkRun");
+    if (zkRun == null && zkHost == null)
+        return;  // not in zk mode
+
     // if zkHost sys property is not set, we are not using ZooKeeper
     String zookeeperHost;
     if(zkHost == null) {
@@ -105,7 +109,7 @@
       zookeeperHost = zkHost;
     }
 
-    zkServer = new SolrZkServer(System.getProperty("zkRun"), zookeeperHost, solrHome, hostPort);
+    zkServer = new SolrZkServer(zkRun, zookeeperHost, solrHome, hostPort);
     zkServer.parseConfig();
     zkServer.start();
 
@@ -470,6 +474,9 @@
         if(zooKeeperController != null) {
           zooKeeperController.close();
         }
+        if (zkServer != null) {
+          zkServer.stop();
+        }
         isShutDown = true;
       }
     }



Mime
View raw message