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 2023/05/20 02:38:26 UTC

[kyuubi] branch master updated: [KYUUBI #4861] Support Flink session idleness

This is an automated email from the ASF dual-hosted git repository.

chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new 52464c25d [KYUUBI #4861] Support Flink session idleness
52464c25d is described below

commit 52464c25da220bb431a25123d1f6e6a5a15d14c8
Author: Paul Lin <pa...@gmail.com>
AuthorDate: Sat May 20 10:38:13 2023 +0800

    [KYUUBI #4861] Support Flink session idleness
    
    ### _Why are the changes needed?_
    
    Support Flink session idleness.
    
    ### _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
    
    - [x] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request
    
    Closes #4862 from link3280/KYUUBI-4861.
    
    Closes #4861
    
    463d1bf9f [Paul Lin] [KYUUBI #4861] Fix class cast exception
    882203157 [Paul Lin] [KYUUBI #4861] Improve code style
    451403882 [Paul Lin] [KYUUBI #4861] Support Flink session idleness
    
    Authored-by: Paul Lin <pa...@gmail.com>
    Signed-off-by: Cheng Pan <ch...@apache.org>
---
 .../apache/kyuubi/engine/flink/session/FlinkSQLSessionManager.scala | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/session/FlinkSQLSessionManager.scala b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/session/FlinkSQLSessionManager.scala
index 71caaa67a..c7aa7c3c5 100644
--- a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/session/FlinkSQLSessionManager.scala
+++ b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/session/FlinkSQLSessionManager.scala
@@ -70,6 +70,12 @@ class FlinkSQLSessionManager(engineContext: DefaultContext)
     }
   }
 
+  override def getSessionOption(sessionHandle: SessionHandle): Option[Session] = {
+    val session = super.getSessionOption(sessionHandle)
+    session.foreach(s => s.asInstanceOf[FlinkSessionImpl].fSession.touch())
+    session
+  }
+
   override def closeSession(sessionHandle: SessionHandle): Unit = {
     super.closeSession(sessionHandle)
     sessionManager.closeSession(