vanzin commented on a change in pull request #25342:
[SPARK-28571][CORE][SHUFFLE] Use the shuffle writer plugin for the
SortShuffleWriter
URL: https://github.com/apache/spark/pull/25342#discussion_r318225275
##########
File path:
core/src/main/scala/org/apache/spark/shuffle/sort/SortShuffleWriter.scala
##########
@@ -64,18 +64,11 @@ private[spark] class SortShuffleWriter[K, V, C](
// Don't bother including the time to open the merged output file in the
shuffle write time,
// because it just opens a single file, so is typically too fast to
measure accurately
// (see SPARK-3570).
- val output = shuffleBlockResolver.getDataFile(dep.shuffleId, mapId)
- val tmp = Utils.tempFileWith(output)
- try {
- val blockId = ShuffleBlockId(dep.shuffleId, mapId,
IndexShuffleBlockResolver.NOOP_REDUCE_ID)
- val partitionLengths = sorter.writePartitionedFile(blockId, tmp)
- shuffleBlockResolver.writeIndexFileAndCommit(dep.shuffleId, mapId,
partitionLengths, tmp)
- mapStatus = MapStatus(blockManager.shuffleServerId, partitionLengths)
- } finally {
- if (tmp.exists() && !tmp.delete()) {
- logError(s"Error while deleting temp file ${tmp.getAbsolutePath}")
- }
- }
+ val mapOutputWriter = shuffleExecutorComponents.createMapOutputWriter(
+ dep.shuffleId, mapId, context.taskAttemptId(),
dep.partitioner.numPartitions)
+ val partitionLengths = sorter.writePartitionedMapOutput(dep.shuffleId,
mapId, mapOutputWriter)
+ mapOutputWriter.commitAllPartitions()
Review comment:
Just checking that you don't need any changes here? Given your other change
that made `commitAllPartitions` return the partition lengths.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]