You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2022/11/07 11:44:20 UTC
[incubator-kyuubi] branch branch-1.6 updated: [KYUUBI #3774] Output OpenSessionCount when Engine is waiting for exit because it reaches the Max lifetime
This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch branch-1.6
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git
The following commit(s) were added to refs/heads/branch-1.6 by this push:
new d25d2b29b [KYUUBI #3774] Output OpenSessionCount when Engine is waiting for exit because it reaches the Max lifetime
d25d2b29b is described below
commit d25d2b29ba6697abd599daecc0a7becda74515e8
Author: senmiaoliu <se...@trip.com>
AuthorDate: Mon Nov 7 19:43:52 2022 +0800
[KYUUBI #3774] Output OpenSessionCount when Engine is waiting for exit because it reaches the Max lifetime
### _Why are the changes needed?_
When the Engine reaches the maximum running time, it can output the OpenSessionCount while waiting to exit
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
Closes #3774 from lsm1/features/info_opensession_count.
Closes #3774
ae6e12a0 [senmiaoliu] info openSession count before engine shutdown because life time too long
Authored-by: senmiaoliu <se...@trip.com>
Signed-off-by: Cheng Pan <ch...@apache.org>
(cherry picked from commit ce74e27a506dcd48fe61bad30f98358252659c8b)
Signed-off-by: Cheng Pan <ch...@apache.org>
---
.../main/scala/org/apache/kyuubi/engine/spark/SparkSQLEngine.scala | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLEngine.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLEngine.scala
index 828af1adb..fa707468e 100644
--- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLEngine.scala
+++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLEngine.scala
@@ -102,7 +102,10 @@ case class SparkSQLEngine(spark: SparkSession) extends Serverable("SparkSQLEngin
frontendServices.flatMap(_.discoveryService).foreach(_.stop())
}
- if (backendService.sessionManager.getOpenSessionCount <= 0) {
+ val openSessionCount = backendService.sessionManager.getOpenSessionCount
+ if (openSessionCount > 0) {
+ info(s"${openSessionCount} connection(s) are active, delay shutdown")
+ } else {
info(s"Spark engine has been running for more than $maxLifetime ms" +
s" and no open session now, terminating")
stop()