aljoscha commented on a change in pull request #11460:
[FLINK-16655][FLINK-16657] Introduce embedded executor and use it for Web
Submission
URL: https://github.com/apache/flink/pull/11460#discussion_r402183098
##########
File path:
flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/handlers/JarRunHandler.java
##########
@@ -67,41 +69,39 @@ public JarRunHandler(
final MessageHeaders<JarRunRequestBody,
JarRunResponseBody, JarRunMessageParameters> messageHeaders,
final Path jarDir,
final Configuration configuration,
- final Executor executor) {
+ final Executor executor,
+ final Supplier<ApplicationRunner>
applicationRunnerSupplier) {
super(leaderRetriever, timeout, responseHeaders,
messageHeaders);
this.jarDir = requireNonNull(jarDir);
this.configuration = requireNonNull(configuration);
this.executor = requireNonNull(executor);
+
+ this.applicationRunner = applicationRunnerSupplier.get();
}
@Override
protected CompletableFuture<JarRunResponseBody> handleRequest(
@Nonnull final HandlerRequest<JarRunRequestBody,
JarRunMessageParameters> request,
@Nonnull final DispatcherGateway gateway) throws
RestHandlerException {
- final JarHandlerContext context =
JarHandlerContext.fromRequest(request, jarDir, log);
-
- final SavepointRestoreSettings savepointRestoreSettings =
getSavepointRestoreSettings(request);
-
- final CompletableFuture<JobGraph> jobGraphFuture =
getJobGraphAsync(context, savepointRestoreSettings);
-
- CompletableFuture<Integer> blobServerPortFuture =
gateway.getBlobServerPort(timeout);
- CompletableFuture<JobGraph> jarUploadFuture =
jobGraphFuture.thenCombine(blobServerPortFuture, (jobGraph, blobServerPort) -> {
- final InetSocketAddress address = new
InetSocketAddress(gateway.getHostname(), blobServerPort);
- try {
-
ClientUtils.extractAndUploadJobGraphFiles(jobGraph, () -> new
BlobClient(address, configuration));
- } catch (FlinkException e) {
- throw new CompletionException(e);
- }
+ configuration.set(DeploymentOptions.ATTACHED, false);
Review comment:
We should create a new `Configuration` and leave the field untouched.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services