[
https://issues.apache.org/jira/browse/FLINK-4890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15801410#comment-15801410
]
ASF GitHub Bot commented on FLINK-4890:
---------------------------------------
GitHub user StephanEwen opened a pull request:
https://github.com/apache/flink/pull/3064
[FLINK-4890] [core] Make GlobFilePathFilter work on Windows
When extracting the file path from the Flink `Path` object, this
de-slashifies the path, if it is a slashed windows path.
This is analogous to the logic in `Path.toString()`.
The commit contains a minor cleanup in `FilePathFilter` to improve comments
and fix serializability warnings.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/StephanEwen/incubator-flink glob_win
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/3064.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #3064
----
commit 2d099cc2f3e18b081ba59ca863a562be636cab7a
Author: Stephan Ewen <[email protected]>
Date: 2017-01-05T13:44:00Z
[FLINK-4890] [core] Make GlobFilePathFilter work on Windows
----
> FileInputFormatTest#testExcludeFiles fails on Windows OS
> --------------------------------------------------------
>
> Key: FLINK-4890
> URL: https://issues.apache.org/jira/browse/FLINK-4890
> Project: Flink
> Issue Type: Bug
> Components: Batch Connectors and Input/Output Formats
> Affects Versions: 1.1.3
> Environment: Windows 10
> Reporter: Chesnay Schepler
>
> Running the mentioned test leads to an exception:
> {code}
> Illegal char <:> at index 2:
> /C:/dev/cygwin64/tmp/junit3838395086498044255/another_file.bin
> java.nio.file.InvalidPathException: Illegal char <:> at index 2:
> /C:/dev/cygwin64/tmp/junit3838395086498044255/anot
>
> her_file.bin
> at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
> at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
> at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
> at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
> at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
> at java.nio.file.Paths.get(Paths.java:84)
> at
> org.apache.flink.api.common.io.GlobFilePathFilter.filterPath(GlobFilePathFilter.java:95)
> at
> org.apache.flink.api.common.io.FileInputFormat.acceptFile(FileInputFormat.java:644)
> at
> org.apache.flink.api.common.io.FileInputFormat.addFilesInDir(FileInputFormat.java:600)
> at
> org.apache.flink.api.common.io.FileInputFormat.createInputSplits(FileInputFormat.java:476)
> at
> org.apache.flink.api.common.io.FileInputFormatTest.testReadMultiplePatterns(FileInputFormatTest.java:362)
> {code}
> The problem is that we are given a flink Path, which is then converted to a
> String and given to the nio FIleSystem. The passed path is thus /C:/...,
> which nio can't work with.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)