Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6147#discussion_r195067963
  
    --- Diff: 
flink-clients/src/main/java/org/apache/flink/client/program/rest/RestClusterClient.java
 ---
    @@ -313,38 +305,32 @@ public JobSubmissionResult submitJob(JobGraph 
jobGraph, ClassLoader classLoader)
                // we have to enable queued scheduling because slot will be 
allocated lazily
                jobGraph.setAllowQueuedScheduling(true);
     
    -           log.info("Requesting blob server port.");
    -           CompletableFuture<BlobServerPortResponseBody> portFuture = 
sendRequest(BlobServerPortHeaders.getInstance());
    -
    -           CompletableFuture<JobGraph> jobUploadFuture = 
portFuture.thenCombine(
    -                   getDispatcherAddress(),
    -                   (BlobServerPortResponseBody response, String 
dispatcherAddress) -> {
    -                           final int blobServerPort = response.port;
    -                           final InetSocketAddress address = new 
InetSocketAddress(dispatcherAddress, blobServerPort);
    -                           final List<PermanentBlobKey> keys;
    -                           try {
    -                                   log.info("Uploading jar files.");
    -                                   keys = BlobClient.uploadFiles(address, 
flinkConfig, jobGraph.getJobID(), jobGraph.getUserJars());
    -                                   jobGraph.uploadUserArtifacts(address, 
flinkConfig);
    -                           } catch (IOException ioe) {
    -                                   throw new CompletionException(new 
FlinkException("Could not upload job files.", ioe));
    -                           }
    -
    -                           for (PermanentBlobKey key : keys) {
    -                                   jobGraph.addUserJarBlobKey(key);
    -                           }
    -
    -                           return jobGraph;
    -                   });
    -
    -           CompletableFuture<JobSubmitResponseBody> submissionFuture = 
jobUploadFuture.thenCompose(
    -                   (JobGraph jobGraphToSubmit) -> {
    -                           log.info("Submitting job graph.");
    -
    +           CompletableFuture<JobSubmitResponseBody> submissionFuture = 
getWebMonitorBaseUrl()
    +                   .thenCompose(webMonitorBaseUrl -> {
                                try {
    -                                   return sendRequest(
    +                                   jobGraph.zipUserArtifacts();
    --- End diff --
    
    I think zipping should not be the responsibility of the `JobGraph`.


---

Reply via email to