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

Windows command script can not handle quotes in parameter

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.3.0
    • Component/s: Deploy, Windows
    • Labels:
      None
    • Environment:

      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

            • Assignee:
              zhaoxk Xiaokai Zhao
              Reporter:
              zhaoxk Xiaokai Zhao
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: