sarutak commented on a change in pull request #33253:
URL: https://github.com/apache/spark/pull/33253#discussion_r688209434
##########
File path: core/src/main/scala/org/apache/spark/status/AppStatusListener.scala
##########
@@ -1208,6 +1232,33 @@ private[spark] class AppStatusListener(
}
}
+ private def killedTaskSummaryForSpeculationStageSummary(
+ reason: TaskEndReason,
+ oldSummary: Map[String, Int],
+ isSpeculative: Boolean): Map[String, Int] = {
+ reason match {
+ case k: TaskKilled if k.reason.contains("another attempt succeeded") =>
+ if (isSpeculative) {
+ oldSummary.updated("original attempt succeeded",
+ oldSummary.getOrElse("original attempt succeeded", 0) + 1)
+ } else {
+ oldSummary.updated("speculated attempt succeeded",
+ oldSummary.getOrElse("speculated attempt succeeded", 0) + 1)
+ }
+ // If the stage is finished and speculative tasks get killed, then the
+ // kill reason is "stage finished"
+ case k: TaskKilled if k.reason.contains("Stage finished") =>
+ if (isSpeculative) {
+ oldSummary.updated("original attempt succeeded",
+ oldSummary.getOrElse("original attempt succeeded", 0) + 1)
+ } else {
+ oldSummary
Review comment:
Sorry for the late reply.
> I don't think we need special handling for zombie tasks.
Yes, I don't think we need to handle zombie tasks too. What I mean is that,
if the reason is `Stage finished`, the killed task can be one of the following.
(1) Speculative attempt of a task
(2) A task which has speculative attempt
(3) A task which neither is speculative nor has speculative, but is zombie
For (1), it is handled
[here](https://github.com/apache/spark/pull/33253/files#diff-0d63c25e93eb1fbec25754f0bee7714c7e3c1538bc7370d94b147524db5c1f63R1251).
I don't think we need to handle the case (3) but should we handle (2) in the
[else
block](https://github.com/apache/spark/pull/33253/files#diff-0d63c25e93eb1fbec25754f0bee7714c7e3c1538bc7370d94b147524db5c1f63R1255)
somehow?
--
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]