You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by GitBox <gi...@apache.org> on 2021/11/15 01:55:00 UTC
[GitHub] [incubator-kyuubi] simon824 commented on a change in pull request #1353: [KYUUBI #1351] Implement api: /${version}/sessions/${identifier}/operations
simon824 commented on a change in pull request #1353:
URL: https://github.com/apache/incubator-kyuubi/pull/1353#discussion_r748957884
##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/SessionsResource.scala
##########
@@ -109,6 +109,111 @@ private[v1] class SessionsResource extends ApiRequestContext {
Response.ok().build()
}
+ @POST
+ @Path("{sessionHandle}/executestatement")
+ def executeStatement(@PathParam("sessionHandle") sessionHandleStr: String,
+ request: StatementRequest): OperationHandle = {
+ val sessionHandle = getSessionHandle(sessionHandleStr)
+ try {
+ backendService.executeStatement(sessionHandle, request.statement, request.runAsync,
+ request.queryTimeout)
+ } catch {
+ case NonFatal(_) =>
+ throw new NotFoundException(s"Error executing statement")
+ }
+ }
+
+ @POST
+ @Path("{sessionHandle}/gettypeinfo")
+ def getTypeInfo(@PathParam("sessionHandle") sessionHandleStr: String): OperationHandle = {
+ val sessionHandle = getSessionHandle(sessionHandleStr)
+ try {
+ backendService.getTypeInfo(sessionHandle)
+ } catch {
+ case NonFatal(_) =>
+ throw new NotFoundException(s"Error getting typeInfo")
+ }
+ }
+
+ @POST
+ @Path("{sessionHandle}/getcatalogs")
Review comment:
What about `catalogs` or `catelogshandle`?
--
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: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org