Skip to content

Commit

Permalink
info openSession count before engine shutdown because life time too long
Browse files Browse the repository at this point in the history
  • Loading branch information
lsm1 committed Nov 7, 2022
1 parent c0ecb4b commit ae6e12a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit ae6e12a

Please sign in to comment.