Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Dist cache yarn during submit should throw error for adding same file…
… under archives and files
  • Loading branch information
kishorvpatil committed Oct 27, 2016
commit 2c55fc202f3780a9090ed17a9f41bea4c887f048
8 changes: 6 additions & 2 deletions yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala
Original file line number Diff line number Diff line change
Expand Up @@ -598,8 +598,12 @@ 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) {
Copy link
Contributor

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.

if (localizedPath != null) {
cachedSecondaryJarLinks += localizedPath
}
} else {
require(localizedPath !=null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add space after !=

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets change the error to illegal argument exception.
Also lets comment this to indicate jars are ok due to spark 2.0 jar install, everything else shouldn't have multiple of same jar/file/archive.

}
}
}
Expand Down