You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by brkyvz <gi...@git.apache.org> on 2015/04/28 22:35:10 UTC

[GitHub] spark pull request: [SPARK-7205] Support `.ivy2/local` and `.m2/re...

GitHub user brkyvz opened a pull request:

    https://github.com/apache/spark/pull/5755

    [SPARK-7205] Support `.ivy2/local` and `.m2/repositories/` in --packages

    In addition, I made a small change that will allow users to import 2 different artifacts with the same name. That change is made in `[organization]_[artifact]-[revision].[ext]`. This used to be only `[artifact].[ext]` which might have caused collisions between artifacts with the same artifactId, but different groupId's.
    
    cc @pwendell 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/brkyvz/spark local-caches

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/5755.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #5755
    
----
commit c47c9c517a9c90b562199a70f3ab6e15cd625483
Author: Burak Yavuz <br...@gmail.com>
Date:   2015-04-28T20:30:44Z

    Small fixes to --packages

----


---
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


[GitHub] spark pull request: [SPARK-7205] Support `.ivy2/local` and `.m2/re...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/5755#issuecomment-97200327
  
    Merged build started.


---
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


[GitHub] spark pull request: [SPARK-7205] Support `.ivy2/local` and `.m2/re...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/5755


---
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


[GitHub] spark pull request: [SPARK-7205] Support `.ivy2/local` and `.m2/re...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5755#discussion_r29311362
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala ---
    @@ -722,13 +722,31 @@ private[deploy] object SparkSubmitUtils {
       /**
        * Extracts maven coordinates from a comma-delimited string
        * @param remoteRepos Comma-delimited string of remote repositories
    +   * @param ivySettings The Ivy settings for this session
        * @return A ChainResolver used by Ivy to search for and resolve dependencies.
        */
    -  def createRepoResolvers(remoteRepos: Option[String]): ChainResolver = {
    +  def createRepoResolvers(remoteRepos: Option[String], ivySettings: IvySettings): ChainResolver = {
         // We need a chain resolver if we want to check multiple repositories
         val cr = new ChainResolver
         cr.setName("list")
     
    +    val localM2 = new IBiblioResolver
    +    localM2.setM2compatible(true)
    +    val m2Path = ".m2" + File.separator + "repository" + File.separator
    --- End diff --
    
    ah I guess that comes with `setM2compatible`.


---
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


[GitHub] spark pull request: [SPARK-7205] Support `.ivy2/local` and `.m2/re...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/5755#issuecomment-97200614
  
      [Test build #31167 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/31167/consoleFull) for   PR 5755 at commit [`c47c9c5`](https://github.com/apache/spark/commit/c47c9c517a9c90b562199a70f3ab6e15cd625483).


---
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


[GitHub] spark pull request: [SPARK-7205] Support `.ivy2/local` and `.m2/re...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/5755#issuecomment-97242759
  
    Merged build finished. Test PASSed.


---
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


[GitHub] spark pull request: [SPARK-7205] Support `.ivy2/local` and `.m2/re...

Posted by brkyvz <gi...@git.apache.org>.
Github user brkyvz commented on the pull request:

    https://github.com/apache/spark/pull/5755#issuecomment-97313356
  
    I tested it locally. I can add unit tests. In fact I have a `Utils` file that creates mock repositories wherever I want them. I can add that suite in a follow up PR (or on this one). It's about 180 lines. With that, we can get rid of the internet dependency (and potential flakiness).


---
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


[GitHub] spark pull request: [SPARK-7205] Support `.ivy2/local` and `.m2/re...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/5755#issuecomment-97200299
  
     Merged build triggered.


---
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


[GitHub] spark pull request: [SPARK-7205] Support `.ivy2/local` and `.m2/re...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/5755#issuecomment-97242746
  
      [Test build #31167 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/31167/consoleFull) for   PR 5755 at commit [`c47c9c5`](https://github.com/apache/spark/commit/c47c9c517a9c90b562199a70f3ab6e15cd625483).
     * This patch **passes all tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.
     * This patch does not change any dependencies.


---
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


[GitHub] spark pull request: [SPARK-7205] Support `.ivy2/local` and `.m2/re...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/5755#issuecomment-97242761
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/31167/
    Test PASSed.


---
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


[GitHub] spark pull request: [SPARK-7205] Support `.ivy2/local` and `.m2/re...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5755#discussion_r29311326
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala ---
    @@ -722,13 +722,31 @@ private[deploy] object SparkSubmitUtils {
       /**
        * Extracts maven coordinates from a comma-delimited string
        * @param remoteRepos Comma-delimited string of remote repositories
    +   * @param ivySettings The Ivy settings for this session
        * @return A ChainResolver used by Ivy to search for and resolve dependencies.
        */
    -  def createRepoResolvers(remoteRepos: Option[String]): ChainResolver = {
    +  def createRepoResolvers(remoteRepos: Option[String], ivySettings: IvySettings): ChainResolver = {
         // We need a chain resolver if we want to check multiple repositories
         val cr = new ChainResolver
         cr.setName("list")
     
    +    val localM2 = new IBiblioResolver
    +    localM2.setM2compatible(true)
    +    val m2Path = ".m2" + File.separator + "repository" + File.separator
    --- End diff --
    
    Are you sure that you can point ivy to a maven repository like this? Ivy and maven use different format for laying out directory structures (does setUsepoms just make this work?). I'd make sure you explicitly test this locally with the .m2 folder.


---
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


[GitHub] spark pull request #5755: [SPARK-7205] Support `.ivy2/local` and `.m2/reposi...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5755#discussion_r157848354
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala ---
    @@ -899,7 +916,8 @@ private[deploy] object SparkSubmitUtils {
           }
           // retrieve all resolved dependencies
           ivy.retrieve(rr.getModuleDescriptor.getModuleRevisionId,
    -        packagesDirectory.getAbsolutePath + File.separator + "[artifact](-[classifier]).[ext]",
    +        packagesDirectory.getAbsolutePath + File.separator +
    +          "[organization]_[artifact]-[revision].[ext]",
    --- End diff --
    
    What is the reason we got rid of `(-[classifier])`? 
    
    I saw some discussions about this. For example, 
    > If this pattern for instance doesn't has the [type] or [classifier] token, Ivy will download the source/javadoc artifacts to the same file as the regular jar.


---

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


[GitHub] spark pull request: [SPARK-7205] Support `.ivy2/local` and `.m2/re...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on the pull request:

    https://github.com/apache/spark/pull/5755#issuecomment-97316441
  
    Okay thanks - we have SPARK-7224 for dealing with better automated testing. I'll merge this now.


---
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


[GitHub] spark pull request: [SPARK-7205] Support `.ivy2/local` and `.m2/re...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on the pull request:

    https://github.com/apache/spark/pull/5755#issuecomment-97312152
  
    LGTM - but just to be sure, since the unit tests don't actually cover loading a jar from the local maven or ivy cache, have you tested it locally? If you wanted to go above and beyond, you could create unit tests that generate a maven or ivy dependency in temporary folder and then test that you can load it.


---
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