spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vanzin <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-9263] Added flags to exclude dependenci...
Date Fri, 31 Jul 2015 02:13:04 GMT
Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7599#discussion_r35941702
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala ---
    @@ -275,21 +277,18 @@ object SparkSubmit {
     
         // Resolve maven dependencies if there are any and add classpath to jars. Add them
to py-files
         // too for packages that include Python code
    -    val resolvedMavenCoordinates =
    -      SparkSubmitUtils.resolveMavenCoordinates(
    -        args.packages, Option(args.repositories), Option(args.ivyRepoPath))
    -    if (!resolvedMavenCoordinates.trim.isEmpty) {
    -      if (args.jars == null || args.jars.trim.isEmpty) {
    -        args.jars = resolvedMavenCoordinates
    +    val exclusions: Seq[String] =
    +      if (!StringUtils.isBlank(args.packagesExclusions)) {
    +        args.packagesExclusions.split(",")
           } else {
    -        args.jars += s",$resolvedMavenCoordinates"
    +        Nil
           }
    +    val resolvedMavenCoordinates = SparkSubmitUtils.resolveMavenCoordinates(args.packages,
    +      Some(args.repositories), Some(args.ivyRepoPath), exclusions = exclusions)
    +    if (!StringUtils.isBlank(resolvedMavenCoordinates)) {
    +      args.jars = mergeFileLists(args.jars, resolvedMavenCoordinates)
           if (args.isPython) {
    -        if (args.pyFiles == null || args.pyFiles.trim.isEmpty) {
    -          args.pyFiles = resolvedMavenCoordinates
    -        } else {
    -          args.pyFiles += s",$resolvedMavenCoordinates"
    -        }
    +        args.pyFiles = mergeFileLists(args.pyFiles, resolvedMavenCoordinates)
    --- End diff --
    
    I know this was here before, but it looks a bit weird to distribute maven artifacts (generally
java code?) in `pyFiles` (which ends up in `PYTHONPATH`).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message