cloud-fan commented on a change in pull request #32530:
URL: https://github.com/apache/spark/pull/32530#discussion_r631815368
##########
File path:
core/src/main/scala/org/apache/spark/internal/io/HadoopMapReduceCommitProtocol.scala
##########
@@ -188,13 +188,18 @@ class HadoopMapReduceCommitProtocol(
val filesToMove = allAbsPathFiles.foldLeft(Map[String, String]())(_ ++ _)
logDebug(s"Committing files staged for absolute locations $filesToMove")
+ val absParentPaths = filesToMove.values.map(new Path(_).getParent).toSet
if (dynamicPartitionOverwrite) {
- val absPartitionPaths = filesToMove.values.map(new
Path(_).getParent).toSet
- logDebug(s"Clean up absolute partition directories for overwriting:
$absPartitionPaths")
- absPartitionPaths.foreach(fs.delete(_, true))
+ logDebug(s"Clean up absolute partition directories for overwriting:
$absParentPaths")
+ absParentPaths.foreach(fs.delete(_, true))
}
+ logDebug(s"Create absolute parent directories: $absParentPaths")
+ absParentPaths.foreach(fs.mkdirs)
for ((src, dst) <- filesToMove) {
- fs.rename(new Path(src), new Path(dst))
+ if (!fs.rename(new Path(src), new Path(dst))) {
Review comment:
I'm asking because this is different from
https://github.com/apache/spark/pull/32207/files#diff-714f288ff8f97acca2fc3449e005d4abcab4a5d95883498652f507fa42a92a6aR191
--
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]