Github user pwendell commented on a diff in the pull request:
https://github.com/apache/spark/pull/4754#discussion_r25482866
--- Diff:
core/src/main/scala/org/apache/spark/deploy/SparkSubmitDriverBootstrapper.scala
---
@@ -82,13 +85,25 @@ private[spark] object SparkSubmitDriverBootstrapper {
.orElse(confDriverMemory)
.getOrElse(defaultDriverMemory)
- val newClasspath =
+ var newClasspath =
if (submitClasspath.isDefined) {
classpath
} else {
classpath + confClasspath.map(sys.props("path.separator") +
_).getOrElse("")
}
+ // Resolve maven dependencies if there are any and add them to
classpath. Also send them
+ // to SparkSubmit so that they can be shipped to executors.
+ val resolvedMavenCoordinates =
+ SparkSubmitUtils.resolveMavenCoordinates(
+ submitPackages, submitRepositories, confIvyRepo)
+ if (resolvedMavenCoordinates.nonEmpty) {
+ newClasspath += sys.props("path.separator") +
+ resolvedMavenCoordinates.mkString(sys.props("path.separator"))
+ submitArgs =
+ Array("--packages-resolved",
resolvedMavenCoordinates.mkString(",")) ++ submitArgs
--- End diff --
Can we thread this through using an environment variable
`_PACKAGES_RESOLVED`? Having this as an extra flag forces you to make `args`
here mutable, which is sort of strange.
---
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]