pan3793 commented on code in PR #4144: URL: https://github.com/apache/kyuubi/pull/4144#discussion_r1082292685
########## kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/BatchesResource.scala: ########## @@ -161,6 +163,40 @@ private[v1] class BatchesResource extends ApiRequestContext with Logging { @POST @Consumes(Array(MediaType.APPLICATION_JSON)) def openBatchSession(request: BatchRequest): Batch = { + openBatchSessionInternal(request) + } + + @ApiResponse( + responseCode = "200", + content = Array(new Content( + mediaType = MediaType.APPLICATION_JSON, + schema = new Schema(implementation = classOf[Batch]))), + description = "create and open a batch session with uploading resource file") + @POST + @Path("/upload") Review Comment: I'm a little bit concerned w/ this path since it's not only uploading the JAR but also creating the batch job. Comparing to the existing API, the differences are 1) the accepted media type is multipart/form-data 2) it allows(or requires) the JAR as a parameter So, would it be good to use the same path w/ `POST /api/v1/batches`? Since they have different consume media types, the framework should correctly dispatch the request to the method. cc @turboFei -- 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: notifications-unsubscr...@kyuubi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@kyuubi.apache.org For additional commands, e-mail: notifications-h...@kyuubi.apache.org