Skip to content

Commit d70bcee

Browse files
author
Michael Gummelt
committed
use filter instead of filterKeys
1 parent 05c4da3 commit d70bcee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ private[mesos] class MesosSubmitRequestServlet(
100100
// We only need the ability to specify where to find spark-submit script
101101
// which user can user spark.executor.home or spark.home configurations.
102102
//
103-
// Due to https://issues.scala-lang.org/browse/SI-6654, `filterKeys` returns an
104-
// unserializable object, so we must call `.map(identity)` on the result.
105-
val environmentVariables = request.environmentVariables.filterKeys(!_.equals("SPARK_HOME"))
106-
.map(identity)
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+
}
107107
val name = request.sparkProperties.get("spark.app.name").getOrElse(mainClass)
108108

109109
// Construct driver description

0 commit comments

Comments
 (0)