JoshRosen commented on code in PR #43250:
URL: https://github.com/apache/spark/pull/43250#discussion_r1357445322
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/ui/SQLAppStatusListener.scala:
##########
@@ -490,7 +490,12 @@ private class LiveExecutionData(val executionId: Long)
extends LiveEntity {
var details: String = null
var physicalPlanDescription: String = null
var modifiedConfigs: Map[String, String] = _
- var metrics = collection.Seq[SQLPlanMetric]()
+ private var _metrics = collection.Seq[SQLPlanMetric]()
+ def metrics: collection.Seq[SQLPlanMetric] = _metrics
+ // This mapping is shared across all LiveStageMetrics instances associated
with
+ // this LiveExecutionData, helping to reduce memory overhead by avoiding
waste
+ // from separate immutable maps with largely overlapping sets of entries.
+ val metricAccumulatorIdToMetricType = new ConcurrentHashMap[Long, String]()
Review Comment:
The codepath in question isn't of general relevance and, as it turns out,
might be deprecated soon. Given this, I have updated this PR to use a
`mutable.HashMap` (which simplifies the rest of the code and addresses your
other review comment).
--
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]