dongjoon-hyun commented on a change in pull request #32983:
URL: https://github.com/apache/spark/pull/32983#discussion_r654889990



##########
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:
       The exception depends on the underlying Hadoop versions. Technically, 
Apache Hadoop 3.3.1 also should not throw this. I suspect that something is 
messed up in Jenkins `.m2` directory.




-- 
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]

Reply via email to