Github user susanxhuynh commented on a diff in the pull request: https://github.com/apache/spark/pull/20641#discussion_r172222399 --- Diff: resource-managers/mesos/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterSchedulerSuite.scala --- @@ -199,6 +199,38 @@ class MesosClusterSchedulerSuite extends SparkFunSuite with LocalSparkContext wi }) } + test("properly wraps and escapes parameters passed to driver command") { + setScheduler() + + val mem = 1000 + val cpu = 1 + + val response = scheduler.submitDriver( + new MesosDriverDescription("d1", "jar", mem, cpu, true, + command, + Map("spark.mesos.executor.home" -> "test", + "spark.app.name" -> "test", + // no special characters, wrap only + "spark.driver.extraJavaOptions" -> + "-XX+PrintGC -Dparam1=val1 -Dparam2=val2", + // special characters, to be escaped + "spark.executor.extraJavaOptions" -> + """-Dparam1="value 1" -Dparam2=value\ 2 -Dpath=$PATH"""), --- End diff -- I'm not sure the second param (param2) would be parsed correctly if you actually ran the command. Doesn't there need to be quotes around the space? Have you tested it and checked if the executor gets the correct value for param2?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org