Github user pwendell commented on a diff in the pull request:
https://github.com/apache/spark/pull/2982#discussion_r22637523
--- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
@@ -990,11 +990,19 @@ private[spark] object Utils extends Logging {
for ((key, value) <- extraEnvironment) {
environment.put(key, value)
}
+
+ // When testing, expose the parent class path to the child. This is
processed by
+ // compute-classpath.{cmd,sh} and makes all needed jars available to
child processes
+ // when the assembly is built with the "*-provided" profiles enabled.
+ if (sys.props.contains("spark.testing")) {
+ environment.put("SPARK_DIST_CLASSPATH", sys.props("java.class.path"))
--- End diff --
Is this needed in all cases or only when you are actually running tests
with a "hadoop provided" build and you've supplied you own
`SPARK_DIST_CLASSPATH` for the test JVM. If the latter is true, can we just
propagate the value of `SPARK_DIST_CLASSPATH` to the child from the parent?
It's a bit weird here because you're setting SPARK_DIST_CLASSPATH to also
include all of the normal spark classes.
Then you would just check if `SPARK_DIST_CLASSPATH` is set and if so, you'd
propagate it to the child environment.
---
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]