-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-18099][YARN] Fail if same files added to distributed cache for --files and --archives #15627
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
Changes from 2 commits
2c55fc2
a1dc858
33f95ab
f797481
51eefa5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -598,8 +598,16 @@ private[spark] class Client( | |
| ).foreach { case (flist, resType, addToClasspath) => | ||
| flist.foreach { file => | ||
| val (_, localizedPath) = distribute(file, resType = resType) | ||
| if (addToClasspath && localizedPath != null) { | ||
| cachedSecondaryJarLinks += localizedPath | ||
| if (addToClasspath) { | ||
| if (localizedPath != null) { | ||
| cachedSecondaryJarLinks += localizedPath | ||
| } | ||
| } else { | ||
| if (localizedPath != null) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess here is |
||
| throw new IllegalArgumentException(s"Attempt to add ($file) multiple times. " + | ||
| "Please check the values of 'spark.yarn.dist.files' and/or " + | ||
|
||
| "'spark.yarn.dist.archives'.") | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
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.
can you add a comment here explaining what exactly thi sis doing to help explain and keep from breaking in future.
Also can you add another unit test to cover this case.