bowenliang123 commented on code in PR #6335: URL: https://github.com/apache/kyuubi/pull/6335#discussion_r1697848320
########## kyuubi-rest-client/src/main/java/org/apache/kyuubi/client/BatchRestApi.java: ########## @@ -53,6 +54,19 @@ public Batch createBatch(BatchRequest request, File resourceFile) { return this.getClient().post(API_BASE_PATH, multiPartMap, Batch.class, client.getAuthHeader()); } + public Batch createBatch(BatchRequest request, File resourceFile, List<String> extraResources) { + setClientVersion(request); + Map<String, MultiPart> multiPartMap = new HashMap<>(); + multiPartMap.put("batchRequest", new MultiPart(MultiPart.MultiPartType.JSON, request)); + multiPartMap.put("resourceFile", new MultiPart(MultiPart.MultiPartType.FILE, resourceFile)); + for (String path : extraResources) { + File file = new File(path); + String fileName = file.getName(); + multiPartMap.put(fileName, new MultiPart(MultiPart.MultiPartType.FILE, file)); Review Comment: Here in L165 https://github.com/apache/kyuubi/pull/6335/files/d35219f9f388a1fb91e12c2f008730e5aabf015b#diff-bb6880107c3d6bf608f287bbbc8f59f8705b72818473bff46d348844855d91acR165. Mapping is marked via extraResourcesMap. -- 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