HyukjinKwon commented on code in PR #39102:
URL: https://github.com/apache/spark/pull/39102#discussion_r1051714428
##########
sql/core/src/main/scala/org/apache/spark/sql/internal/SharedState.scala:
##########
@@ -109,13 +109,18 @@ private[sql] class SharedState(
* A status store to query SQL status/metrics of this Spark application,
based on SQL-specific
* [[org.apache.spark.scheduler.SparkListenerEvent]]s.
*/
- val statusStore: SQLAppStatusStore = {
- val kvStore =
sparkContext.statusStore.store.asInstanceOf[ElementTrackingStore]
- val listener = new SQLAppStatusListener(conf, kvStore, live = true)
- sparkContext.listenerBus.addToStatusQueue(listener)
- val statusStore = new SQLAppStatusStore(kvStore, Some(listener))
- sparkContext.ui.foreach(new SQLTab(statusStore, _))
- statusStore
+ val statusStore: SQLAppStatusStore = SharedState.synchronized {
Review Comment:
`SharedState` is shared across multiple sessions. How can this be created
multiple times?
--
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]