Yutong-1424 commented on code in PR #7391:
URL: https://github.com/apache/kyuubi/pull/7391#discussion_r3082006942


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/SessionsResource.scala:
##########
@@ -52,11 +52,15 @@ private[v1] class SessionsResource extends 
ApiRequestContext with Logging {
     content = Array(new Content(
       mediaType = MediaType.APPLICATION_JSON,
       array = new ArraySchema(schema = new Schema(implementation = 
classOf[SessionData])))),
-    description = "get the list of all live sessions")
+    description = "get the list of live sessions for the current user")
   @GET
   def sessions(): Seq[SessionData] = {
-    sessionManager.allSessions()
-      .map(session => 
ApiUtils.sessionData(session.asInstanceOf[KyuubiSession])).toSeq
+    val userName = fe.getSessionUser(Map.empty[String, String])
+    sessionManager
+      .allSessions()
+      .filter(session => session.user == userName)

Review Comment:
   Thanks for your comments, all comments addressed:
   - Config renamed to `kyuubi.server.conf.retrieveMode`
   - Using enum
   - Added legacy session list config with migration guide
   - Regenerated settings.md
   



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