yanghua commented on a change in pull request #1445:
URL: https://github.com/apache/incubator-kyuubi/pull/1445#discussion_r761716822



##########
File path: 
kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/SessionsResource.scala
##########
@@ -322,6 +322,70 @@ private[v1] class SessionsResource extends 
ApiRequestContext {
     }
   }
 
+  @ApiResponse(
+    responseCode = "200",
+    content = Array(new Content(
+      mediaType = MediaType.APPLICATION_JSON)),
+    description = "Close an operation")
+  @DELETE
+  @Path("{sessionHandle}/operations/{operationHandle}")
+  def closeOperation(
+      @PathParam("sessionHandle") sessionHandleStr: String,
+      @PathParam("operationHandle") operationHandleStr: String): 
OperationHandle = {
+    val sessionHandle = getSessionHandle(sessionHandleStr)
+    val operationHandle = getOperationHandle(operationHandleStr)
+    try {
+      
backendService.sessionManager.getSession(sessionHandle).closeOperation(operationHandle)
+      operationHandle
+    } catch {
+      case NonFatal(_) =>
+        throw new NotFoundException(s"Error closing an operation")
+    }
+  }
+
+  @ApiResponse(
+    responseCode = "200",
+    content = Array(new Content(
+      mediaType = MediaType.APPLICATION_JSON)),
+    description =
+      "Get an operation handle with a given session identifier and operation 
identifier")
+  @GET

Review comment:
       Yeah, Maybe we can remove this API that you put here. This API is for 
supporting a pure Hive RPC service interface.




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