Github user pwendell commented on a diff in the pull request:
https://github.com/apache/spark/pull/1056#discussion_r15682407
--- Diff:
core/src/main/scala/org/apache/spark/ui/jobs/JobProgressListener.scala ---
@@ -171,28 +155,70 @@ class JobProgressListener(conf: SparkConf) extends
SparkListener with Logging {
(Some(e.toErrorString), None)
}
+ if (!metrics.isEmpty) {
+ val oldMetrics =
stageData.taskData.get(info.taskId).flatMap(_.taskMetrics)
+ updateAggregateMetrics(stageData, info.executorId, metrics.get,
oldMetrics)
+ }
- val taskRunTime = metrics.map(_.executorRunTime).getOrElse(0L)
- stageData.executorRunTime += taskRunTime
- val inputBytes =
metrics.flatMap(_.inputMetrics).map(_.bytesRead).getOrElse(0L)
- stageData.inputBytes += inputBytes
-
- val shuffleRead =
metrics.flatMap(_.shuffleReadMetrics).map(_.remoteBytesRead).getOrElse(0L)
- stageData.shuffleReadBytes += shuffleRead
-
- val shuffleWrite =
-
metrics.flatMap(_.shuffleWriteMetrics).map(_.shuffleBytesWritten).getOrElse(0L)
- stageData.shuffleWriteBytes += shuffleWrite
-
- val memoryBytesSpilled =
metrics.map(_.memoryBytesSpilled).getOrElse(0L)
- stageData.memoryBytesSpilled += memoryBytesSpilled
+ val taskData = stageData.taskData.getOrElseUpdate(info.taskId, new
TaskUIData(info))
+ taskData.taskInfo = info
+ taskData.taskMetrics = metrics
+ taskData.errorMessage = errorMessage
+ }
+ }
- val diskBytesSpilled = metrics.map(_.diskBytesSpilled).getOrElse(0L)
- stageData.diskBytesSpilled += diskBytesSpilled
+ def updateAggregateMetrics(
--- End diff --
Could you add a javadoc for this?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---