Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-4368

TaskRunner fails to start jars when the java.library.path contains a quoted path with embedded spaces

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1-win
    • Fix Version/s: 1-win
    • Component/s: tasktracker
    • Labels:
    • Environment:

      on Windows:
      set PATH=%PATH%;"C:\this memorable place".

    • Target Version/s:

      Description

      TaskRunner splits arguments by space before it adds them back to the vargs list, so it loses all context of quote escaped strings with embedded spaces. This gets fixed up later by wrapping all arguments with " – so you get something like java "-D<opt>=<value>". This is problematic for paths with embedded spaces, where we end up creating "-D<opt>=<first part" "last part>". To java, the jar being run is last part. So with the environment above, you will see "ClassNoDefFoundError: memorable" and the jar will fail to start. In this particular case, we know that java.libarary.path contains paths and the tests often use %PATH% to seed this, so the fix is to remove embedded quotes in listed path elements because we know the aggregate will be quoted when the JVM is started.

        Attachments

        1. TaskRunner.patch
          1 kB
          John Gordon
        2. TaskRunner2.patch
          1 kB
          John Gordon
        3. TaskRunner3.patch
          2 kB
          John Gordon

          Issue Links

            Activity

              People

              • Assignee:
                jgordon John Gordon
                Reporter:
                jgordon John Gordon
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 24h
                  24h
                  Remaining:
                  Remaining Estimate - 24h
                  24h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified