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

    https://github.com/apache/spark/pull/10332#discussion_r47902198
  
    --- Diff: 
core/src/main/scala/org/apache/spark/deploy/rest/mesos/MesosRestServer.scala ---
    @@ -94,7 +94,12 @@ private[mesos] class MesosSubmitRequestServlet(
         val driverMemory = sparkProperties.get("spark.driver.memory")
         val driverCores = sparkProperties.get("spark.driver.cores")
         val appArgs = request.appArgs
    -    val environmentVariables = request.environmentVariables
    +    // We don't want to pass down SPARK_HOME when launching Spark apps
    +    // with Mesos cluster mode since it's populated by default on the 
client and it will
    +    // cause spark-submit script to look for files in SPARK_HOME instead.
    +    // We only need the ability to specify where to find spark-submit 
script
    +    // which user can user spark.executor.home or spark.home 
configurations.
    +    val environmentVariables = 
request.environmentVariables.filter(!_.equals("SPARK_HOME"))
    --- End diff --
    
    Unfortunately there is a subtle error here, and this is a no-op. And nobody 
ran this code, it seems.
    
    Here's what happens: `environmentVariables` is a map, not a sequence. So 
`filter` works on Pairs, and a pair will never be equal to a string. The 
correct call would have been `filterKeys`.
    
    Unfortunately this went in RC3 without fixing the bug. It is harmless 
otherwise, but highlights the fact that there are no easy fixes or safe 
changes. :-/


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to