-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-22849] ivy.retrieve pattern should also consider classifier
#20037
Conversation
@srowen I think we are resolving a different issue. Your PR #17416 is trying to resolve the issues raised by However, we still face another scenario, the package has the external dependencies. In the dependencies, they could have the same name but different classifiers. For example, zookeeper 3.4.6 has tests.jar and regular jar. In the current solution, we will download both to the same file and ivy will return an exception.
|
@@ -1271,7 +1271,7 @@ private[spark] object SparkSubmitUtils { | |||
// retrieve all resolved dependencies | |||
ivy.retrieve(rr.getModuleDescriptor.getModuleRevisionId, | |||
packagesDirectory.getAbsolutePath + File.separator + | |||
"[organization]_[artifact]-[revision].[ext]", | |||
"[organization]_[artifact]-[revision](-[classifier]).[ext]", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my example,
zookeeper-jar: {artifact=zookeeper, ext=jar, module=zookeeper, classifier=tests, organisation=org.apache.zookeeper, type=test-jar, revision=3.4.6}
zookeeper-jar: {artifact=zookeeper, ext=jar, module=zookeeper, organisation=org.apache.zookeeper, type=jar, revision=3.4.6}
Both dependencies will have the same name org.apache.zookeeper_zookeeper-3.4.6.jar
and cause the collision. After my PR, they will be different names
org.apache.zookeeper_zookeeper-3.4.6.jar
org.apache.zookeeper_zookeeper-3.4.6-tests.jar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason why I am putting classifier
at the end. I am just following the default artifact partern in the Apache IVY.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW this looks fine; I needed a similar change as part of srowen@4126702
It's possible you may need some other changes from that WIP commit; not sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it today. Somehow, I only got the test jar downloaded. Have you guys seen this issue?
LGTM |
Thanks! Merged to master. |
Test build #85197 has finished for PR 20037 at commit
|
What changes were proposed in this pull request?
In the previous PR #5755 (comment), we dropped
(-[classifier])
from the retrieval pattern. We should add it back; otherwise,How was this patch tested?
The existing tests