You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2011/10/03 06:47:24 UTC

svn commit: r1178296 - in /lucene/dev/branches/solrcloud/solr: core/src/java/org/apache/solr/core/CoreContainer.java example/solr/solr.xml

Author: markrmiller
Date: Mon Oct  3 04:47:24 2011
New Revision: 1178296

URL: http://svn.apache.org/viewvc?rev=1178296&view=rev
Log:
SOLR-2722: In solr.xml, default hostPort to ${jetty.port}

Modified:
    lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/core/CoreContainer.java
    lucene/dev/branches/solrcloud/solr/example/solr/solr.xml

Modified: lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/core/CoreContainer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/core/CoreContainer.java?rev=1178296&r1=1178295&r2=1178296&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/core/CoreContainer.java (original)
+++ lucene/dev/branches/solrcloud/solr/core/src/java/org/apache/solr/core/CoreContainer.java Mon Oct  3 04:47:24 2011
@@ -329,9 +329,13 @@ public class CoreContainer 
     zkClientTimeout = cfg.getInt("solr/cores/@zkClientTimeout", 10000);
 
     hostPort = System.getProperty("hostPort");
-    if (hostPort == null) {
+    if (hostPort == null || hostPort.length() == 0) {
       hostPort = cfg.get("solr/cores/@hostPort", "8983");
     }
+    // TODO: should we do this generically in cfg?
+    if (hostPort != null && hostPort.length() == 0) {
+      hostPort = "8983";
+    }
 
     hostContext = cfg.get("solr/cores/@hostContext", "solr");
     host = cfg.get("solr/cores/@host", null);

Modified: lucene/dev/branches/solrcloud/solr/example/solr/solr.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/solr/example/solr/solr.xml?rev=1178296&r1=1178295&r2=1178296&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/solr/example/solr/solr.xml (original)
+++ lucene/dev/branches/solrcloud/solr/example/solr/solr.xml Mon Oct  3 04:47:24 2011
@@ -28,7 +28,7 @@
   adminPath: RequestHandler path to manage cores.  
     If 'null' (or absent), cores will not be manageable via request handler
   -->
-  <cores adminPath="/admin/cores" defaultCoreName="collection1">
+  <cores adminPath="/admin/cores" defaultCoreName="collection1" hostPort="${jetty.port:}">
     <core name="collection1" instanceDir="." />
   </cores>
 </solr>