dongjoon-hyun commented on a change in pull request #30312:
URL: https://github.com/apache/spark/pull/30312#discussion_r528249849
##########
File path:
core/src/main/scala/org/apache/spark/shuffle/ShuffleWriteProcessor.scala
##########
@@ -57,7 +58,20 @@ private[spark] class ShuffleWriteProcessor extends
Serializable with Logging {
createMetricsReporter(context))
writer.write(
rdd.iterator(partition, context).asInstanceOf[Iterator[_ <:
Product2[Any, Any]]])
- writer.stop(success = true).get
+ val mapStatus = writer.stop(success = true)
+ if (mapStatus.isDefined) {
+ // Initiate shuffle push process if push based shuffle is enabled
+ // The map task only takes care of converting the shuffle data file
into multiple
+ // block push requests. It delegates pushing the blocks to a different
thread-pool -
+ // PushShuffleSupport.BLOCK_PUSHER_POOL.
+ if (Utils.isPushBasedShuffleEnabled(SparkEnv.get.conf) &&
dep.getMergerLocs.nonEmpty) {
+ val dataFile =
manager.shuffleBlockResolver.asInstanceOf[IndexShuffleBlockResolver]
Review comment:
Although we have only `IndexShuffleBlockResolver`, this looks risky.
Let's avoid this pattern and use Scala *match* pattern please.
----------------------------------------------------------------
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]