You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/12/21 09:51:03 UTC

[GitHub] [incubator-kyuubi] turboFei commented on a diff in pull request #4019: Binding python/sql spark session

turboFei commented on code in PR #4019:
URL: https://github.com/apache/incubator-kyuubi/pull/4019#discussion_r1054189974


##########
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/session/SparkSQLSessionManager.scala:
##########
@@ -177,3 +181,18 @@ class SparkSQLSessionManager private (name: String, spark: SparkSession)
 
   override protected def isServer: Boolean = false
 }
+
+object SparkSQLSessionManager {
+  private val sessionManager = new AtomicReference[SparkSQLSessionManager]
+
+  private def setSessionManager(manager: SparkSQLSessionManager): Unit = {
+    sessionManager.set(manager)
+  }
+
+  def getSparkSession(uuid: String): SparkSession = {
+    sessionManager.get()

Review Comment:
   how about get from object `SparkSQLEngine`. 



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org