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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 2.0.0, 1.2.0
    • 2.0.0, 1.2.0
    • None
    • 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

              srdo Stig Rohde Døssing
              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