Skip to content

Commit 2c55fc2

Browse files
committed
Dist cache yarn during submit should throw error for adding same file under archives and files
1 parent c5fe3dd commit 2c55fc2

File tree

1 file changed

+6
-2
lines changed
  • yarn/src/main/scala/org/apache/spark/deploy/yarn

1 file changed

+6
-2
lines changed

yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,8 +598,12 @@ private[spark] class Client(
598598
).foreach { case (flist, resType, addToClasspath) =>
599599
flist.foreach { file =>
600600
val (_, localizedPath) = distribute(file, resType = resType)
601-
if (addToClasspath && localizedPath != null) {
602-
cachedSecondaryJarLinks += localizedPath
601+
if (addToClasspath) {
602+
if (localizedPath != null) {
603+
cachedSecondaryJarLinks += localizedPath
604+
}
605+
} else {
606+
require(localizedPath !=null)
603607
}
604608
}
605609
}

0 commit comments

Comments
 (0)