Skip to content

Commit df02319

Browse files
Michael Gummeltsarutak
authored andcommitted
[SPARK-12413] Fix Mesos ZK persistence
I believe this fixes SPARK-12413. I'm currently running an integration test to verify. Author: Michael Gummelt <mgummelt@mesosphere.io> Closes apache#10366 from mgummelt/fix-zk-mesos. (cherry picked from commit 2bebaa3) Signed-off-by: Kousuke Saruta <sarutak@oss.nttdata.co.jp>
1 parent 9177ea3 commit df02319

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

core/src/main/scala/org/apache/spark/deploy/rest/mesos/MesosRestServer.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,11 @@ private[mesos] class MesosSubmitRequestServlet(
9999
// look for files in SPARK_HOME instead. We only need the ability to specify where to find
100100
// spark-submit script which user can user spark.executor.home or spark.home configurations
101101
// (SPARK-12345).
102-
val environmentVariables = request.environmentVariables.filterKeys(!_.equals("SPARK_HOME"))
102+
103+
// Do not use `filterKeys` here to avoid SI-6654, which breaks ZK persistence
104+
val environmentVariables = request.environmentVariables.filter { case (k, _) =>
105+
k != "SPARK_HOME"
106+
}
103107
val name = request.sparkProperties.get("spark.app.name").getOrElse(mainClass)
104108

105109
// Construct driver description

0 commit comments

Comments
 (0)