File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
core/src/main/scala/org/apache/spark/executor Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -361,10 +361,13 @@ private[spark] class Executor(
361361 Option (taskRunner.task).flatMap(_.metrics).foreach { metrics =>
362362 metrics.updateShuffleReadMetrics
363363 if (isLocal) {
364- // make a deep copy of it
364+ // JobProgressListener will hold an reference of it during
365+ // onExecutorMetricsUpdate(), then JobProgressListener can not see
366+ // the changes of metrics any more, so make a deep copy of it
365367 val copiedMetrics = Utils .deserialize[TaskMetrics ](Utils .serialize(metrics))
366368 tasksMetrics += ((taskRunner.taskId, copiedMetrics))
367369 } else {
370+ // It will be copied by serialization
368371 tasksMetrics += ((taskRunner.taskId, metrics))
369372 }
370373 }
You can’t perform that action at this time.
0 commit comments