otterc commented on a change in pull request #33446:
URL: https://github.com/apache/spark/pull/33446#discussion_r674990541



##########
File path: 
core/src/main/scala/org/apache/spark/storage/PushBasedFetchHelper.scala
##########
@@ -138,10 +140,19 @@ private class PushBasedFetchHelper(
         ((shuffleBlockId.shuffleId, shuffleBlockId.reduceId), size)
     }.toMap
     val address = req.address
+    var remainingBlockCount = sizeMap.size
+    val requestStartTime = clock.nanoTime()
+
     val mergedBlocksMetaListener = new MergedBlocksMetaListener {
       override def onSuccess(shuffleId: Int, reduceId: Int, meta: 
MergedBlockMeta): Unit = {
         logInfo(s"Received the meta of push-merged block for ($shuffleId, 
$reduceId)  " +
           s"from ${req.address.host}:${req.address.port}")
+        remainingBlockCount -= 1
+        if (remainingBlockCount == 0) {
+          iterator.logFetchIfSlow(
+            TimeUnit.NANOSECONDS.toMillis(clock.nanoTime() - requestStartTime),
+            sizeMap.values.sum, sizeMap.size, address)
+        }

Review comment:
       The fetch of remote merged block data happens in the 
`ShuffleBlockFetchIterator.sendRequest`. That either sends `FetchShuffleBlocks` 
or `FetchShuffleBlockChunks`. So, logging slowness for those are already 
covered.
    




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to