Github user pashields commented on a diff in the pull request:
https://github.com/apache/spark/pull/7979#discussion_r38640758
--- Diff:
core/src/main/scala/org/apache/spark/deploy/rest/RestSubmissionClient.scala ---
@@ -413,6 +412,15 @@ private[spark] object RestSubmissionClient {
val mainClass = args(1)
val appArgs = args.slice(2, args.size)
val conf = new SparkConf
- run(appResource, mainClass, appArgs, conf)
+ val env = filterSystemEnvironment(sys.env)
+ run(appResource, mainClass, appArgs, conf, env)
+ }
+
+ /**
+ * Filter non-spark environment variables from any environment.
+ */
+ def filterSystemEnvironment(env: Map[String, String]): Map[String,
String] = {
--- End diff --
There is a test for it, so I'd need to make it visible to the test somehow
or remove the test.
I've changed it to protected[rest]. LMK if you have an alternate solution
or would like me to make it private and remove the test.
---
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]