[prev in list] [next in list] [prev in thread] [next in thread] 

List:       solr-dev
Subject:    RE: Policeman Jenkins lost it's "/view/Lucene-Solr/"
From:       "Uwe Schindler" <uwe () thetaphi ! de>
Date:       2020-07-16 10:49:46
Message-ID: 00b401d65b5e$d2572bf0$770583d0$ () thetaphi ! de
[Download RAW message or body]

Exactly,

in Zookeeper alls paths are forward slashes (as it is a "path" inside the zookeeper \
environment). If you replace that with a NIO Windows Path it creates backslashes. \
This makes Zookeeper fail (of course).

Actually using the Hadoop class is broken workaround, it may be better to use the \
java.net.URI class for correct "path" transformations. The risk with \
java.nio.file.Path is also that if the path exists in file system it handles the \
resolving different. So if some user has for some reason a local path exactly looking \
like a zookeper node path it would use different behaviour.

So my suggestion: Use java.net.URI to build the path and use URI.getPath() or similar \
to make a String out of it. The alternative to replace all backslashes in the path to \
forwards slashes is a bad idea for the reasons I explained before.

BTW, Windows is happy again!

Uwe

-----
Uwe Schindler
Achterdiek 19, D-28357 Bremen
https://www.thetaphi.de
eMail: uwe@thetaphi.de

> -----Original Message-----
> From: Erick Erickson <erickerickson@gmail.com>
> Sent: Thursday, July 16, 2020 1:40 AM
> To: dev@lucene.apache.org
> Subject: Re: Policeman Jenkins lost it's "/view/Lucene-Solr/"
> 
> Let me try something. In the "you've got to be joking" category. Tell me you
> wouldn't have made the same mistake ;)
> 
> In several places:
> 
> String parent = new Path(leaderPath).getParent().toString();
> 
> was replaced with:
> 
> String parent = Paths.get(leaderPath).getParent().toString();
> 
> BUT, the new Path bit is actually a in org.apache.hadoop.fs that has lines like:
> 
> if (hasWindowsDrive(pathString) && pathString.charAt(0) != '/') {
> pathString = "/" + pathString;
> }
> 
> And a number of the erorrs are about how "blah doesn't begin with /".
> 
> I'll fix this and push and we'll see. If that's not it, we should revert but we \
> won't know until tomorrow.
> 
> Erick
> 
> > On Jul 15, 2020, at 11:27 AM, Uwe Schindler <uwe@thetaphi.de> wrote:
> > 
> > RoutingToNodesWithPropertiesTest
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic