You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ro...@apache.org on 2015/02/25 13:30:44 UTC
svn commit: r1662206 - in /lucene/dev/branches/branch_5x: ./ solr/
solr/CHANGES.txt solr/solrj/
solr/solrj/src/java/org/apache/solr/common/cloud/ZkConfigManager.java
Author: romseygeek
Date: Wed Feb 25 12:30:44 2015
New Revision: 1662206
URL: http://svn.apache.org/r1662206
Log:
SOLR-7158: Fix zk upload on Windows systems
Modified:
lucene/dev/branches/branch_5x/ (props changed)
lucene/dev/branches/branch_5x/solr/ (props changed)
lucene/dev/branches/branch_5x/solr/CHANGES.txt (contents, props changed)
lucene/dev/branches/branch_5x/solr/solrj/ (props changed)
lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/common/cloud/ZkConfigManager.java
Modified: lucene/dev/branches/branch_5x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/CHANGES.txt?rev=1662206&r1=1662205&r2=1662206&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_5x/solr/CHANGES.txt Wed Feb 25 12:30:44 2015
@@ -64,8 +64,8 @@ New Features
* SOLR-1945: Add support for child docs in DocumentObjectBinder (Noble Paul, Mark Miller)
-* SOLR-7125: You can upload and download configurations via CloudSolrClient
- (Alan Woodward)
+* SOLR-7125, SOLR-7158: You can upload and download configurations via CloudSolrClient
+ (Alan Woodward, Ishan Chattopadhyaya)
* SOLR-5507: Admin UI - Refactoring using AngularJS, first part (Upayavira via
Erick Erickson)
Modified: lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/common/cloud/ZkConfigManager.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/common/cloud/ZkConfigManager.java?rev=1662206&r1=1662205&r2=1662206&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/common/cloud/ZkConfigManager.java (original)
+++ lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/common/cloud/ZkConfigManager.java Wed Feb 25 12:30:44 2015
@@ -61,7 +61,7 @@ public class ZkConfigManager {
String filename = file.getFileName().toString();
if (filename.startsWith("."))
return FileVisitResult.CONTINUE;
- String zkNode = zkPath + "/" + rootPath.relativize(file).toString();
+ String zkNode = createZkNodeName(zkPath, rootPath, file);
try {
zkClient.makePath(zkNode, file.toFile(), false, true);
} catch (KeeperException | InterruptedException e) {
@@ -78,6 +78,15 @@ public class ZkConfigManager {
});
}
+ private static String createZkNodeName(String zkRoot, Path root, Path file) {
+ String relativePath = root.relativize(file).toString();
+ // Windows shenanigans
+ String separator = root.getFileSystem().getSeparator();
+ if ("\\".equals(separator))
+ relativePath = relativePath.replaceAll("\\\\", "/");
+ return zkRoot + "/" + relativePath;
+ }
+
private void downloadFromZK(String zkPath, Path dir) throws IOException {
try {
List<String> files = zkClient.getChildren(zkPath, null, true);