mxm commented on code in PR #20953:
URL: https://github.com/apache/flink/pull/20953#discussion_r990065742


##########
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/job/JobSubmitHandler.java:
##########
@@ -148,11 +150,30 @@ private CompletableFuture<JobGraph> loadJobGraph(
                                         HttpResponseStatus.BAD_REQUEST,
                                         e));
                     }
+                    try {
+                        applyParallelismOverrides(jobGraph);
+                    } catch (Exception e) {
+                        throw new CompletionException(
+                                new RestHandlerException(
+                                        "Failed to apply parallelism 
overrides",
+                                        
HttpResponseStatus.INTERNAL_SERVER_ERROR,
+                                        e));
+                    }
                     return jobGraph;
                 },
                 executor);
     }
 
+    private void applyParallelismOverrides(JobGraph jobGraph) {
+        Map<String, Integer> overrides = 
configuration.get(PipelineOptions.PARALLELISM_OVERRIDES);

Review Comment:
   The original design had an extra field in the payload to specify the 
override map. This was then changed to go through the configuration instead. I 
was under the assumption that the application mode would also use the REST API 
but it goes directly through the dispatcher. So you're right, this won't work. 



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