turboFei commented on a change in pull request #26348: [SPARK-29698][WEB-UI]
Enable show total shuffle read size even when task failed
URL: https://github.com/apache/spark/pull/26348#discussion_r341426074
##########
File path: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
##########
@@ -1399,8 +1399,20 @@ private[spark] class DAGScheduler(
case _ =>
updateAccumulators(event)
}
- case _: ExceptionFailure | _: TaskKilled => updateAccumulators(event)
- case _ =>
+
+ case fail =>
+ if (task.metrics.shuffleReadMetrics.recordsRead == 0) {
+ val reduceId = task.partitionId
+ val shuffleReadSize =
stage.parents.filter(_.isInstanceOf[ShuffleMapStage])
+ .map(_.asInstanceOf[ShuffleMapStage].shuffleDep.shuffleId)
+
.map(mapOutputTracker.shuffleStatuses.get(_)).map(_.get.mapStatuses)
+ .flatMap(_.map(_.getSizeForBlock(reduceId))).sum
+ task.metrics.shuffleReadMetrics.setRecordsRead(shuffleReadSize)
Review comment:
Thanks for you reply.
I have changed the code and it only set shuffle read size for
ExecutorLostFailure.
I think the reason for executorLostFailure always is data skew.
So the shuffle read size is important for a user, but now it always shown as
0 when ExecutorLostFailure occurred.
----------------------------------------------------------------
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]