Marcin Kurczych created SPARK-23464:

             Summary: MesosClusterScheduler double-escapes parameters to bash 
                 Key: SPARK-23464
             Project: Spark
          Issue Type: Bug
          Components: Mesos
    Affects Versions: 2.2.0
         Environment: Spark 2.2.0 with Mesosphere patches (but the problem 
exists in main repo)

DC/OS 1.9.5
            Reporter: Marcin Kurczych

Parameters passed to driver launching command in Mesos container are escaped 
using _shellEscape_ function. In SPARK-18114 additional wrapping in double 
quotes has been introduced. This cancels out quoting done by _shellEscape_ and 
makes in unable to run tasks with whitespaces in parameters, as they are 
interpreted as additional parameters to in-container spark-submit.

This is how parameter passed to in-container spark-submit looks like now:
--conf "spark.executor.extraJavaOptions="-Dfoo=\"first value\" -Dbar=another""

This is how they look after reverting SPARK-18114 related commit:
--conf spark.executor.extraJavaOptions="-Dfoo=\"first value\" -Dbar=another"

In current version submitting job with such extraJavaOptions causes following 
Error: Unrecognized option: -Dfoo=another

Usage: spark-submit [options] <app jar | python file> [app arguments]
Usage: spark-submit --kill [submission ID] --master [spark://...]
Usage: spark-submit --status [submission ID] --master [spark://...]
Usage: spark-submit run-example [options] example-class [example args]

  --master MASTER_URL         spark://host:port, mesos://host:port, yarn, or 
  --deploy-mode DEPLOY_MODE   Whether to launch the driver program locally 
("client") or
                              on one of the worker machines inside the cluster 
                              (Default: client).
(... further spark-submit help ...)

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to