eemario commented on code in PR #27721:
URL: https://github.com/apache/flink/pull/27721#discussion_r2888598900


##########
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:
   Sorry for the confusion, that was a typo. It should actually use the 
application-level blob. I've updated the code and added a unit test.



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

Reply via email to