Github user pwendell commented on a diff in the pull request: https://github.com/apache/spark/pull/4216#discussion_r24144401 --- Diff: core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala --- @@ -372,12 +453,28 @@ object SparkSubmit { sysProps("spark.submit.pyFiles") = formattedPyFiles } + // NOTE: If we are using the REST gateway, we will use the original arguments directly. + // Since we mutate the values of some configs in this method, we must update the + // corresponding fields in the original SparkSubmitArguments to reflect these changes. + if (args.isStandaloneCluster) { --- End diff -- What about moving this logic outside of this prepare environment function, and just deal with it when you know you are about to do a rest submission. There you have access to the sys props and original arguments. Also, I really wonder if we can simplify this code. It's very complicated to trace down what is going on here.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org