HyukjinKwon commented on a change in pull request #32983:
URL: https://github.com/apache/spark/pull/32983#discussion_r654866351
##########
File path:
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala
##########
@@ -401,7 +401,13 @@ private[spark] class Client(
if (force || !compareFs(srcFs, destFs) || "file".equals(srcFs.getScheme)) {
destPath = new Path(destDir, destName.getOrElse(srcPath.getName()))
logInfo(s"Uploading resource $srcPath -> $destPath")
- FileUtil.copy(srcFs, srcPath, destFs, destPath, false, hadoopConf)
+ try {
+ FileUtil.copy(srcFs, srcPath, destFs, destPath, false, hadoopConf)
+ } catch {
+ // HADOOP-16878 changes the behavior to throw exceptions when src
equals to dest
+ case e: PathOperationException
+ if force &&
srcFs.makeQualified(srcPath).equals(destFs.makeQualified(destPath)) =>
Review comment:
Just for doubly sure, previously it just silently ignored the operation
instead of forcing the copy from the source to destination when both paths are
same with `force` set `true`, and this PR keeps the same behaviour regardless
of the Hadoop version?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]