Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/14969#discussion_r77597402
--- Diff: core/src/main/scala/org/apache/spark/ui/exec/ExecutorsTab.scala
---
@@ -70,15 +72,33 @@ class ExecutorsListener(storageStatusListener:
StorageStatusListener, conf: Spar
executorToLogUrls(eid) = executorAdded.executorInfo.logUrlMap
executorToTotalCores(eid) = executorAdded.executorInfo.totalCores
executorToTasksMax(eid) = executorToTotalCores(eid) /
conf.getInt("spark.task.cpus", 1)
- executorIdToData(eid) = new ExecutorUIData(executorAdded.time)
+ executorEvents += executorAdded
+ if (executorEvents.size > MAX_EXECUTOR_LIMIT) {
+ executorEvents = executorEvents.drop(1)
+ }
}
override def onExecutorRemoved(
executorRemoved: SparkListenerExecutorRemoved): Unit = synchronized {
+ executorEvents += executorRemoved
+ if (executorEvents.size > MAX_EXECUTOR_LIMIT) {
+ executorEvents = executorEvents.drop(1)
+ }
val eid = executorRemoved.executorId
- val uiData = executorIdToData(eid)
- uiData.finishTime = Some(executorRemoved.time)
- uiData.finishReason = Some(executorRemoved.reason)
+ executorToTotalCores.remove(eid)
--- End diff --
This collection of parallel maps is a bit of a mess. While you're here,
consider defining a simple case class to encapsulate all of this info so that
it can be updated in one map, as a unit. That would save even more time/storage.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]