Github user davies commented on a diff in the pull request:
https://github.com/apache/spark/pull/9610#discussion_r44499545
--- Diff:
core/src/main/scala/org/apache/spark/shuffle/hash/HashShuffleWriter.scala ---
@@ -106,6 +108,19 @@ private[spark] class HashShuffleWriter[K, V](
writer.commitAndClose()
writer.fileSegment().length
}
+ // rename all shuffle files to final paths
+ shuffle.writers.zip(sizes).foreach { case (writer:
DiskBlockObjectWriter, size: Long) =>
+ if (size > 0) {
+ val output = blockManager.diskBlockManager.getFile(writer.blockId)
+ if (output.exists()) {
+ writer.file.delete()
+ } else {
+ if (!writer.file.renameTo(output)) {
+ throw new IOException(s"fail to rename ${writer.file} to
$output")
--- End diff --
I think these partitions are independent, they should be OK whenever it's
generated in different attempt, or that's the basic idea of how RDD works
(could be re-run and got the same result).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]