turboFei commented on code in PR #2856:
URL: https://github.com/apache/incubator-kyuubi/pull/2856#discussion_r897795961


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/session/KyuubiSessionImpl.scala:
##########
@@ -68,7 +68,10 @@ class KyuubiSessionImpl(
     case (key, value) => sessionConf.set(key, value)
   }
 
-  var engine: EngineRef = _
+  private lazy val engineCredentials = renewEngineCredentials()
+
+  lazy val engine: EngineRef =
+    new EngineRef(sessionConf, user, handle.identifier.toString, 
sessionManager.applicationManager)

Review Comment:
   how about this? @ulysses-you 
   
   set the `engineCredentials`  and `EngineRef` be lazy val.
   
   engineCredentials => set into sessionConf => new EngineRef => 
_client.openSession
   



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