Github user jerryshao commented on a diff in the pull request:
https://github.com/apache/spark/pull/18630#discussion_r127562278
--- Diff:
core/src/main/scala/org/apache/spark/deploy/worker/DriverWrapper.scala ---
@@ -66,4 +75,50 @@ object DriverWrapper {
System.exit(-1)
}
}
+
+ // R or Python are not supported in cluster mode so just get jars and
files for the driver
+ private def setupDependencies(loader: MutableURLClassLoader, userJar:
String): Unit = {
+
+ var packagesExclusions = sys.props.get("spark.jars.excludes").orNull
+ var packages = sys.props.get("spark.jars.packages").orNull
+ var repositories = sys.props.get("spark.jars.repositories").orNull
+ val hadoopConf = new HadoopConfiguration()
+ val childClasspath = new ArrayBuffer[String]()
+ var jars = sys.props.get("spark.jars").orNull
+ var files = sys.props.get("spark.files").orNull
+ var ivyRepoPath = sys.props.get("spark.jars.ivy").orNull
+
+ val exclusions: Seq[String] =
+ if (!StringUtils.isBlank(packagesExclusions)) {
+ packagesExclusions.split(",")
+ } else {
+ Nil
+ }
+
+ // Create the IvySettings, either load from file or build defaults
+ val ivySettings = sys.props.get("spark.jars.ivySettings").map {
ivySettingsFile =>
+ SparkSubmitUtils.loadIvySettings(ivySettingsFile,
Option(repositories),
+ Option(ivyRepoPath))
+ }.getOrElse {
+ SparkSubmitUtils.buildIvySettings(Option(repositories),
Option(ivyRepoPath))
+ }
+
+ val resolvedMavenCoordinates =
SparkSubmitUtils.resolveMavenCoordinates(packages,
+ ivySettings, exclusions = exclusions)
+
+ if (!StringUtils.isBlank(resolvedMavenCoordinates)) {
+ jars = SparkSubmit.mergeFileLists(jars, resolvedMavenCoordinates)
+ }
+
+ // filter out the user jar
+ jars =
jars.split(",").filterNot(_.contains(userJar.split("/").last)).mkString(",")
+ jars = Option(jars).map(SparkSubmit.downloadFileList(_,
hadoopConf)).orNull
--- End diff --
The API interface is changed, this is not compilable.
---
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]