Repository: spark
Updated Branches:
  refs/heads/branch-2.2 e77d62a72 -> 4f1ae3af9


[SPARK-23941][MESOS] Mesos task failed on specific spark app name

## What changes were proposed in this pull request?
Shell escaped the name passed to spark-submit and change how conf attributes 
are shell escaped.

## How was this patch tested?
This test has been tested manually with Hive-on-spark with mesos or with the 
use case described in the issue with the sparkPi application with a custom name 
which contains illegal shell characters.

With this PR, hive-on-spark on mesos works like a charm with hive 
3.0.0-SNAPSHOT.

I state that this contribution is my original work and that I license the work 
to the project under the project’s open source license

Author: Bounkong Khamphousone <bounkong.khamphous...@ebiznext.com>

Closes #21014 from tiboun/fix/SPARK-23941.

(cherry picked from commit 6782359a04356e4cde32940861bf2410ef37f445)
Signed-off-by: Marcelo Vanzin <van...@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/4f1ae3af
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/4f1ae3af
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/4f1ae3af

Branch: refs/heads/branch-2.2
Commit: 4f1ae3af9e11dec3d359e35df5bd299d2c7c4fd0
Parents: e77d62a
Author: Bounkong Khamphousone <bounkong.khamphous...@ebiznext.com>
Authored: Tue May 1 08:28:21 2018 -0700
Committer: Marcelo Vanzin <van...@cloudera.com>
Committed: Tue May 1 08:28:49 2018 -0700

----------------------------------------------------------------------
 .../spark/scheduler/cluster/mesos/MesosClusterScheduler.scala    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/4f1ae3af/resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterScheduler.scala
----------------------------------------------------------------------
diff --git 
a/resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterScheduler.scala
 
b/resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterScheduler.scala
index 9354a3b..41f351a 100644
--- 
a/resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterScheduler.scala
+++ 
b/resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterScheduler.scala
@@ -485,9 +485,9 @@ private[spark] class MesosClusterScheduler(
       .filter { case (key, _) => !replicatedOptionsBlacklist.contains(key) }
       .toMap
     (defaultConf ++ driverConf).foreach { case (key, value) =>
-      options ++= Seq("--conf", 
s""""$key=${shellEscape(value)}"""".stripMargin) }
+      options ++= Seq("--conf", s"${key}=${value}") }
 
-    options
+    options.map(shellEscape)
   }
 
   /**


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

Reply via email to