Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-4890

FileInputFormatTest#testExcludeFiles fails on Windows OS

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.3
    • 1.2.0, 1.3.0
    • API / DataSet
    • None
    • Windows 10

    Description

      Running the mentioned test leads to an exception:

      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)
      

      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.

      Attachments

        Issue Links

          Activity

            People

              sewen Stephan Ewen
              chesnay Chesnay Schepler
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: