You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Dániel Bali <ba...@gmail.com> on 2015/03/17 15:41:09 UTC
Windows file path problems
Hi!
I fetched the new updates from the master branch recently and now all tests
fail on Windows.
Here is a full stack trace:
https://gist.github.com/balidani/f429b62208ea90015435
The problem appears to be here:
Caused by: java.lang.IllegalArgumentException:
java.net.URISyntaxException: Relative path in absolute URI: file:C:
at org.apache.flink.core.fs.Path.initialize(Path.java:244)
at org.apache.flink.core.fs.Path.<init>(Path.java:227)
at org.apache.flink.core.fs.Path.<init>(Path.java:140)
at org.apache.flink.core.fs.local.LocalFileSystem.pathToFile(LocalFileSystem.java:147)
...
Does this happen to anybody else?
Thanks,
Daniel
Re: Windows file path problems
Posted by Dániel Bali <ba...@gmail.com>.
Hi,
I created a PR, I hope it's ok like this:
https://github.com/apache/flink/pull/491
2015-03-17 16:51 GMT+01:00 Stephan Ewen <se...@apache.org>:
> Looks fine. Can you make a pull request with that fix?
>
> On Tue, Mar 17, 2015 at 4:41 PM, Dániel Bali <ba...@gmail.com>
> wrote:
>
>> Hi Stephan,
>>
>> The problem is that "file:/C:" is evaluated as a non-absolute path in
>> `Path:isAbsolute`
>> This hack seems to fix the issue:
>>
>> in Path.java from line 318:
>>
>> public boolean isAbsolute() {
>>> final int start = hasWindowsDrive(uri.getPath(), true) ? 3 : 0;
>>> if (uri.getPath().length() > start) {
>>> return uri.getPath().startsWith(SEPARATOR, start);
>>> }
>>> return true;
>>> }
>>
>>
>> Best regards,
>> Daniel
>>
>> 2015-03-17 16:06 GMT+01:00 Stephan Ewen <se...@apache.org>:
>>
>>> I think this is due to a change introduced by Fabian to fix the issue of
>>> trailing slashes. May have this side effect...
>>>
>>> I agree, this is critical and should be fixed soon...
>>>
>>> On Tue, Mar 17, 2015 at 3:41 PM, Dániel Bali <ba...@gmail.com>
>>> wrote:
>>>
>>>> Hi!
>>>>
>>>> I fetched the new updates from the master branch recently and now all
>>>> tests fail on Windows.
>>>>
>>>> Here is a full stack trace:
>>>> https://gist.github.com/balidani/f429b62208ea90015435
>>>>
>>>> The problem appears to be here:
>>>>
>>>> Caused by: java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: file:C:
>>>> at org.apache.flink.core.fs.Path.initialize(Path.java:244)
>>>> at org.apache.flink.core.fs.Path.<init>(Path.java:227)
>>>> at org.apache.flink.core.fs.Path.<init>(Path.java:140)
>>>> at org.apache.flink.core.fs.local.LocalFileSystem.pathToFile(LocalFileSystem.java:147)
>>>> ...
>>>>
>>>> Does this happen to anybody else?
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Daniel
>>>>
>>>>
>>>
>>
>
Re: Windows file path problems
Posted by Stephan Ewen <se...@apache.org>.
Looks fine. Can you make a pull request with that fix?
On Tue, Mar 17, 2015 at 4:41 PM, Dániel Bali <ba...@gmail.com>
wrote:
> Hi Stephan,
>
> The problem is that "file:/C:" is evaluated as a non-absolute path in
> `Path:isAbsolute`
> This hack seems to fix the issue:
>
> in Path.java from line 318:
>
> public boolean isAbsolute() {
>> final int start = hasWindowsDrive(uri.getPath(), true) ? 3 : 0;
>> if (uri.getPath().length() > start) {
>> return uri.getPath().startsWith(SEPARATOR, start);
>> }
>> return true;
>> }
>
>
> Best regards,
> Daniel
>
> 2015-03-17 16:06 GMT+01:00 Stephan Ewen <se...@apache.org>:
>
>> I think this is due to a change introduced by Fabian to fix the issue of
>> trailing slashes. May have this side effect...
>>
>> I agree, this is critical and should be fixed soon...
>>
>> On Tue, Mar 17, 2015 at 3:41 PM, Dániel Bali <ba...@gmail.com>
>> wrote:
>>
>>> Hi!
>>>
>>> I fetched the new updates from the master branch recently and now all
>>> tests fail on Windows.
>>>
>>> Here is a full stack trace:
>>> https://gist.github.com/balidani/f429b62208ea90015435
>>>
>>> The problem appears to be here:
>>>
>>> Caused by: java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: file:C:
>>> at org.apache.flink.core.fs.Path.initialize(Path.java:244)
>>> at org.apache.flink.core.fs.Path.<init>(Path.java:227)
>>> at org.apache.flink.core.fs.Path.<init>(Path.java:140)
>>> at org.apache.flink.core.fs.local.LocalFileSystem.pathToFile(LocalFileSystem.java:147)
>>> ...
>>>
>>> Does this happen to anybody else?
>>>
>>>
>>> Thanks,
>>>
>>> Daniel
>>>
>>>
>>
>
Re: Windows file path problems
Posted by Dániel Bali <ba...@gmail.com>.
Hi Stephan,
The problem is that "file:/C:" is evaluated as a non-absolute path in
`Path:isAbsolute`
This hack seems to fix the issue:
in Path.java from line 318:
public boolean isAbsolute() {
> final int start = hasWindowsDrive(uri.getPath(), true) ? 3 : 0;
> if (uri.getPath().length() > start) {
> return uri.getPath().startsWith(SEPARATOR, start);
> }
> return true;
> }
Best regards,
Daniel
2015-03-17 16:06 GMT+01:00 Stephan Ewen <se...@apache.org>:
> I think this is due to a change introduced by Fabian to fix the issue of
> trailing slashes. May have this side effect...
>
> I agree, this is critical and should be fixed soon...
>
> On Tue, Mar 17, 2015 at 3:41 PM, Dániel Bali <ba...@gmail.com>
> wrote:
>
>> Hi!
>>
>> I fetched the new updates from the master branch recently and now all
>> tests fail on Windows.
>>
>> Here is a full stack trace:
>> https://gist.github.com/balidani/f429b62208ea90015435
>>
>> The problem appears to be here:
>>
>> Caused by: java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: file:C:
>> at org.apache.flink.core.fs.Path.initialize(Path.java:244)
>> at org.apache.flink.core.fs.Path.<init>(Path.java:227)
>> at org.apache.flink.core.fs.Path.<init>(Path.java:140)
>> at org.apache.flink.core.fs.local.LocalFileSystem.pathToFile(LocalFileSystem.java:147)
>> ...
>>
>> Does this happen to anybody else?
>>
>>
>> Thanks,
>>
>> Daniel
>>
>>
>
Re: Windows file path problems
Posted by Stephan Ewen <se...@apache.org>.
I think this is due to a change introduced by Fabian to fix the issue of
trailing slashes. May have this side effect...
I agree, this is critical and should be fixed soon...
On Tue, Mar 17, 2015 at 3:41 PM, Dániel Bali <ba...@gmail.com>
wrote:
> Hi!
>
> I fetched the new updates from the master branch recently and now all
> tests fail on Windows.
>
> Here is a full stack trace:
> https://gist.github.com/balidani/f429b62208ea90015435
>
> The problem appears to be here:
>
> Caused by: java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: file:C:
> at org.apache.flink.core.fs.Path.initialize(Path.java:244)
> at org.apache.flink.core.fs.Path.<init>(Path.java:227)
> at org.apache.flink.core.fs.Path.<init>(Path.java:140)
> at org.apache.flink.core.fs.local.LocalFileSystem.pathToFile(LocalFileSystem.java:147)
> ...
>
> Does this happen to anybody else?
>
>
> Thanks,
>
> Daniel
>
>