steveloughran commented on a change in pull request #32437:
URL: https://github.com/apache/spark/pull/32437#discussion_r645004678
##########
File path:
core/src/main/scala/org/apache/spark/internal/io/HadoopMapReduceCommitProtocol.scala
##########
@@ -215,6 +215,14 @@ class HadoopMapReduceCommitProtocol(
}
fs.rename(new Path(stagingDir, part), finalPartPath)
}
+ // move the _SUCCESS file to the final location
+ fs.globStatus(new Path(s"${stagingDir.toString}/*")).foreach {
Review comment:
This is woefully inefficient as it's listing the entire directory tree
to look for one file whose name is known. Better
```scala
val success = new Path(stagingDir, "_SUCCESS")
if (fs.isFile(success)) {
fs.rename(success, new Path(path, "_SUCCESS"))
}
```
--
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]