Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-2599

BasicContainer.getWildcardDir tries to resolve the wildcard character with Paths.get, which prevents workers from booting on Windows

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0.0, 1.2.0
    • Fix Version/s: 2.0.0, 1.2.0
    • Component/s: None
    • Labels:
      None

      Description

      STORM-2191 shortens the worker classpath by substituting in wildcards for the full list of jars. The path is constructed using Paths.get(dir, "*"), but this doesn't work on Windows. It seems like Windows checks that the path is valid.

      Paths.get(new File(".").toString(), "*");
      
      Exception in thread "main" java.nio.file.InvalidPathException: Illegal char <*> at index 2: .\*
      	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)
      

      Paths doesn't guarantee support for globs, and we don't want the OS to examine the path in any case, since the wildcard isn't a "real" wildcard (including all files) but a special syntax for including jars in the Java classpath. The path should be constructed with String concatenation instead.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Srdo Stig Rohde Døssing
                Reporter:
                Srdo Stig Rohde Døssing
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m