zhuzhurk commented on code in PR #27721:
URL: https://github.com/apache/flink/pull/27721#discussion_r2871182267
##########
flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/handlers/JarRunApplicationHandler.java:
##########
@@ -117,6 +135,44 @@ public CompletableFuture<JarRunApplicationResponseBody>
handleRequest(
});
}
+ private CompletableFuture<PermanentBlobKey> uploadJarFile(
+ final DispatcherGateway gateway,
+ final JarHandlerContext context,
+ final ApplicationID applicationId) {
+ CompletableFuture<Integer> blobServerPortFuture =
gateway.getBlobServerPort(timeout);
+ CompletableFuture<InetAddress> blobServerAddressFuture =
+ gateway.getBlobServerAddress(timeout);
+
+ return blobServerPortFuture
+ .thenCombine(
+ blobServerAddressFuture,
+ (blobServerPort, blobServerAddress) ->
+ new InetSocketAddress(
+ blobServerAddress.getHostName(),
blobServerPort))
+ .thenApply(
+ blobSocketAddress -> {
+ try (BlobClient blobClient =
+ new BlobClient(blobSocketAddress,
configuration)) {
+ org.apache.flink.core.fs.Path jarPath =
+ new org.apache.flink.core.fs.Path(
+
context.getJarFile().toString());
+ PermanentBlobKey blobKey =
+
blobClient.uploadFile(JobID.generate(), jarPath);
Review Comment:
Why making it job-related?
--
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]