Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f613491

Browse files
committedMar 11, 2024·
Remove flink. prefix for create session configurations
1 parent 869400d commit f613491

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
 

‎externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/session/FlinkSQLSessionManager.scala

+6-3
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,22 @@ class FlinkSQLSessionManager(engineContext: DefaultContext)
5454
password: String,
5555
ipAddress: String,
5656
conf: Map[String, String]): Session = {
57-
conf.get(KYUUBI_SESSION_HANDLE_KEY).map(SessionHandle.fromUUID).flatMap(
57+
val newConf = conf.map {
58+
case (k, v) => k.stripPrefix("flink.") -> v
59+
}
60+
newConf.get(KYUUBI_SESSION_HANDLE_KEY).map(SessionHandle.fromUUID).flatMap(
5861
getSessionOption).getOrElse {
5962
val flinkInternalSession = sessionManager.openSession(
6063
SessionEnvironment.newBuilder
6164
.setSessionEndpointVersion(SqlGatewayRestAPIVersion.V1)
62-
.addSessionConfig(mapAsJavaMap(conf))
65+
.addSessionConfig(mapAsJavaMap(newConf))
6366
.build)
6467
val session = new FlinkSessionImpl(
6568
protocol,
6669
user,
6770
password,
6871
ipAddress,
69-
conf,
72+
newConf,
7073
this,
7174
flinkInternalSession)
7275
session

0 commit comments

Comments
 (0)
Please sign in to comment.