ulysses-you commented on code in PR #2856:
URL: https://github.com/apache/incubator-kyuubi/pull/2856#discussion_r897445802


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/session/KyuubiSessionImpl.scala:
##########
@@ -98,6 +98,19 @@ class KyuubiSessionImpl(
 
   private[kyuubi] def openEngineSession(extraEngineLog: Option[OperationLog] = 
None): Unit = {
     withDiscoveryClient(sessionConf) { discoveryClient =>
+      val engineCredentials = renewEngineCredentials()
+      var openEngineSessionConf = optimizedConf
+      if (engineCredentials.nonEmpty) {
+        sessionConf.set(KYUUBI_ENGINE_CREDENTIALS_KEY, engineCredentials)
+        openEngineSessionConf =
+          optimizedConf ++ Map(KYUUBI_ENGINE_CREDENTIALS_KEY -> 
engineCredentials)
+      }
+
+      engine = new EngineRef(
+        sessionConf,

Review Comment:
   can we poll out renewEngineCredentials ? so we do not need change the 
initialization of EngineRef. Then the ordering looks like:
   
   renewEngineCredentials -> new EngineRef -> openEngineSession



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to