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/12/13 02:31:32 UTC

[GitHub] [incubator-kyuubi] simon824 commented on a change in pull request #1540: [KYUUBI #1539] Replace operationDetail with KyuubiEvent

simon824 commented on a change in pull request #1540:
URL: https://github.com/apache/incubator-kyuubi/pull/1540#discussion_r767377084



##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/OperationsResource.scala
##########
@@ -39,18 +41,18 @@ private[v1] class OperationsResource extends ApiRequestContext {
     content = Array(new Content(
       mediaType = MediaType.APPLICATION_JSON)),
     description =
-      "Get an operation detail with a given session identifier and operation identifier")
+      "Get a statement event")
   @GET
-  @Path("{operationHandle}")
-  def getOperationDetail(
-      @PathParam("operationHandle") operationHandleStr: String): OperationDetail = {
+  @Path("{operationHandle}/statementEvent")
+  def getStatementEvent(
+      @PathParam("operationHandle") operationHandleStr: String): KyuubiStatementEvent = {
     try {
       val operation = backendService.sessionManager.operationManager
         .getOperation(parseOperationHandle(operationHandleStr))
-      OperationDetail(operation.shouldRunAsync, operation.isTimedOut, operation.getStatus)
+      KyuubiStatementEvent(operation.asInstanceOf[ExecuteStatement])

Review comment:
       What about add `KyuubiOperationEvent` to support other operations? WDYT @yaooqinn @yanghua 




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