Github user krcz commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20641#discussion_r173909575
  
    --- 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 --
    
    @susanxhuynh 
    I have checked it and it worked. There don't need to be quotes, as the 
space has been escaped. Backslash stops it from being interpreted as a boundary 
between arguments and makes it being understood as simple space in the value.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to