lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r903829 - /lucene/solr/branches/cloud/src/java/org/apache/solr/core/CoreContainer.java
Date Wed, 27 Jan 2010 21:02:26 GMT
Author: markrmiller
Date: Wed Jan 27 21:02:26 2010
New Revision: 903829

URL: http://svn.apache.org/viewvc?rev=903829&view=rev
Log:
fix bug in loading cloud descriptor params from solr.xml

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=903829&r1=903828&r2=903829&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 Wed Jan 27
21:02:26 2010
@@ -383,20 +383,22 @@
           if (opt != null) {
             p.setSchemaName(opt);
           }
-
-          opt = DOMUtil.getAttr(node, "shardId", null);
-          if(testShardIdOverride != null && name.equals("")) {
-            p.getCloudDescriptor().setShardId(testShardIdOverride);
-          } else if(zooKeeperController != null) {
-            p.getCloudDescriptor().setShardId(opt);
-          }
-          opt = DOMUtil.getAttr(node, "role", null);
-          if(opt != null) {
-            p.getCloudDescriptor().setRole(opt);
-          }
-          opt = DOMUtil.getAttr(node, "collection", null);
-          if (opt != null) {
-            p.getCloudDescriptor().setCollectionName(opt);
+          if (zooKeeperController != null) {
+            opt = DOMUtil.getAttr(node, "shardId", null);
+            if (testShardIdOverride != null
+                && name.equals("")) {
+              p.getCloudDescriptor().setShardId(testShardIdOverride);
+            } else if (opt != null) {
+              p.getCloudDescriptor().setShardId(opt);
+            }
+            opt = DOMUtil.getAttr(node, "role", null);
+            if (opt != null) {
+              p.getCloudDescriptor().setRole(opt);
+            }
+            opt = DOMUtil.getAttr(node, "collection", null);
+            if (opt != null) {
+              p.getCloudDescriptor().setCollectionName(opt);
+            }
           }
           opt = DOMUtil.getAttr(node, "properties", null);
           if (opt != null) {



Mime
View raw message