pan3793 commented on code in PR #6335: URL: https://github.com/apache/kyuubi/pull/6335#discussion_r1686158905
########## kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/BatchesResource.scala: ########## @@ -203,6 +204,20 @@ private[v1] class BatchesResource extends ApiRequestContext with Logging { KyuubiApplicationManager.uploadWorkDir, resourceFileMetadata.getFileName) batchRequest.setResource(tempFile.getPath) + + val subresoucesMap = batchRequest.getSubresourcesMap + val transformedSubMap = subresoucesMap.entrySet().asScala.map { a => + val targetConfKey = a.getKey + val subresourceFileName = a.getValue + val filePart = multiPart.getField(subresourceFileName) + val subresourceFile = Utils.writeToTempFile( + filePart.getValueAs(classOf[InputStream]), + KyuubiApplicationManager.uploadWorkDir, + filePart.getContentDisposition.getFileName) + (targetConfKey, subresourceFile.getPath) + }.toMap.asJava + batchRequest.setTransformedSubresourcesMap(transformedSubMap) Review Comment: I'm confused here, for the main resource, we just replace the reference directly, for extra resources, why not find the references and replace them directly too? -- 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