lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1514666 - in /lucene/dev/trunk/solr: CHANGES.txt core/src/java/org/apache/solr/core/CorePropertiesLocator.java core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
Date Fri, 16 Aug 2013 12:01:06 GMT
Author: erick
Date: Fri Aug 16 12:01:06 2013
New Revision: 1514666

URL: http://svn.apache.org/r1514666
Log:
SOLR-5164, Can not create a collection via collections API (cloud mode). Fixes SOLR-5099 too

Modified:
    lucene/dev/trunk/solr/CHANGES.txt
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/CorePropertiesLocator.java
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java

Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1514666&r1=1514665&r2=1514666&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Fri Aug 16 12:01:06 2013
@@ -129,6 +129,8 @@ Bug Fixes
 * SOLR-5122: Fixed bug in spellcheck.collateMaxCollectDocs.  Eliminates risk 
   of divide by zero, and makes estimated hit counts meaningful in non-optimized
   indexes.  (hossman)
+  
+* SOLR-5164: Can not create a collection via collections API (cloud mode) (Erick Erickson)
 
 Optimizations
 ----------------------

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/CorePropertiesLocator.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/CorePropertiesLocator.java?rev=1514666&r1=1514665&r2=1514666&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/CorePropertiesLocator.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/CorePropertiesLocator.java Fri
Aug 16 12:01:06 2013
@@ -31,7 +31,6 @@ import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
 import java.io.Writer;
-import java.util.Date;
 import java.util.List;
 import java.util.Properties;
 
@@ -78,6 +77,7 @@ public class CorePropertiesLocator imple
     Properties p = buildCoreProperties(cd);
     Writer os = null;
     try {
+      propfile.getParentFile().mkdirs();
       os = new OutputStreamWriter(new FileOutputStream(propfile), Charsets.UTF_8);
       p.store(os, "Written by CorePropertiesLocator");
     }

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java?rev=1514666&r1=1514665&r2=1514666&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
(original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
Fri Aug 16 12:01:06 2013
@@ -409,8 +409,9 @@ public class CoreAdminHandler extends Re
     String name = checkNotEmpty(params.get(CoreAdminParams.NAME),
         "Missing parameter [" + CoreAdminParams.NAME + "]");
     String instancedir = params.get(CoreAdminParams.INSTANCE_DIR);
-    if (StringUtils.isEmpty(instancedir))
-      instancedir = container.getSolrHome() + File.separator + name;
+    if (StringUtils.isEmpty(instancedir)) {
+      instancedir = name; // Already relative to solrHome, we haven't been given an absolute
path.
+    }
 
     Properties coreProps = new Properties();
     for (String param : paramToProp.keySet()) {



Mime
View raw message