ulysses-you commented on a change in pull request #1474:
URL: https://github.com/apache/incubator-kyuubi/pull/1474#discussion_r759225623



##########
File path: 
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLEngine.scala
##########
@@ -54,7 +54,12 @@ case class SparkSQLEngine(
     super.start()
     // Start engine self-terminating checker after all services are ready and 
it can be reached by
     // all servers in engine spaces.
-    backendService.sessionManager.startTerminatingChecker()
+    backendService.sessionManager.startTerminatingChecker(() => {
+      currentEngine match {

Review comment:
       if we go into here that means the `currentEngine` has already 
initialized. I think we can do:
   ```java
   assert(currentEngine.isDefined)
   currentEngine.get.stop()
   ```




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


Reply via email to