yaooqinn commented on a change in pull request #1317:
URL: https://github.com/apache/incubator-kyuubi/pull/1317#discussion_r742480536



##########
File path: 
kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/SessionsResource.scala
##########
@@ -61,14 +57,30 @@ private[v1] class SessionsResource extends 
ApiRequestContext {
     }
   }
 
+  @GET
+  @Path("{sessionHandle}/info/{infoType}")
+  def getInfo(@PathParam("sessionHandle") sessionHandleStr: String,
+              @PathParam("infoType") infoType: Int): InfoDetail = {
+    val sessionHandle = getSessionHandle(sessionHandleStr)
+    val info = TGetInfoType.findByValue(infoType.toInt)
+
+    try {
+      val infoValue = backendService.getInfo(sessionHandle, info)
+      InfoDetail(info.toString, infoValue.getStringValue)
+    } catch {
+      case _: Throwable =>
+        throw new NotFoundException()

Review comment:
       shall we add a error message?




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


Reply via email to