tgravescs commented on a change in pull request #31053:
URL: https://github.com/apache/spark/pull/31053#discussion_r552675573



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala
##########
@@ -954,7 +954,10 @@ object SparkSession extends Logging {
         session = new SparkSession(sparkContext, None, None, extensions, 
options.toMap)
         setDefaultSession(session)
         setActiveSession(session)
-        registerContextListener(sparkContext)
+        sparkContext.listenerBus.addToQueueIfNotExists(
+          new ApplicationEndListener(),
+          LiveListenerBus.SHARED_QUEUE

Review comment:
       similar here, why are we exposing this vs having a function 
addToSharedQueue have a parameter?

##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/internal/SharedState.scala
##########
@@ -97,7 +98,7 @@ private[sql] class SharedState(
   val statusStore: SQLAppStatusStore = {
     val kvStore = 
sparkContext.statusStore.store.asInstanceOf[ElementTrackingStore]
     val listener = new SQLAppStatusListener(conf, kvStore, live = true)
-    sparkContext.listenerBus.addToStatusQueue(listener)
+    sparkContext.listenerBus.addToQueueIfNotExists(listener, 
LiveListenerBus.APP_STATUS_QUEUE)

Review comment:
       why are we having to make APP_STATUS_QUEUE visible versus make 
addToStatusQueue have a parameter?  




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to