Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-21877

Windows command script can not handle quotes in parameter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.2.0
    • 2.3.0
    • Deploy, Windows
    • None
    • Spark version: spark-2.2.0-bin-hadoop2.7
      Windows version: Windows 10

    Description

      All the windows command scripts can not handle quotes in parameter.

      Run a windows command shell with parameter which has quotes can reproduce the bug:

      C:\Users\meng\software\spark-2.2.0-bin-hadoop2.7> bin\spark-shell --driver-java-options " -Dfile.encoding=utf-8 "
      'C:\Users\meng\software\spark-2.2.0-bin-hadoop2.7\bin\spark-shell2.cmd" --driver-java-options "' is not recognized as an internal or external command,
      operable program or batch file.

      Windows recognize "--driver-java-options" as part of the command.

      All the Windows command script has the following code have the bug.

      cmd /V /E /C "<other command>" %*

      Attachments

        Activity

          People

            zhaoxk Xiaokai Zhao
            zhaoxk Xiaokai Zhao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: