flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] dmvk commented on a change in pull request #17000: [FLINK-23946][clients] Application mode should shutdown gracefully on…
Date Mon, 30 Aug 2021 19:26:40 GMT

dmvk commented on a change in pull request #17000:
URL: https://github.com/apache/flink/pull/17000#discussion_r698747330



##########
File path: flink-clients/src/main/java/org/apache/flink/client/deployment/application/ApplicationMiniCluster.java
##########
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.client.deployment.application;
+
+import org.apache.flink.api.common.JobSubmissionResult;
+import org.apache.flink.client.program.PackagedProgram;
+import org.apache.flink.runtime.dispatcher.SessionDispatcherFactory;
+import org.apache.flink.runtime.dispatcher.runner.DefaultDispatcherRunnerFactory;
+import org.apache.flink.runtime.entrypoint.component.DefaultDispatcherResourceManagerComponentFactory;
+import org.apache.flink.runtime.entrypoint.component.DispatcherResourceManagerComponentFactory;
+import org.apache.flink.runtime.jobgraph.JobGraph;
+import org.apache.flink.runtime.minicluster.MiniCluster;
+import org.apache.flink.runtime.minicluster.MiniClusterConfiguration;
+import org.apache.flink.runtime.resourcemanager.StandaloneResourceManagerFactory;
+import org.apache.flink.runtime.rest.JobRestEndpointFactory;
+
+import java.util.concurrent.CompletableFuture;
+
+/** An extension to {@link MiniCluster} that runs packaged program in application mode. */
+public class ApplicationMiniCluster extends MiniCluster {

Review comment:
       Agreed, but this is hard to do without breaking mini cluster public API 🤔
   
   I did attempt with AbstractMiniCluster and it didn't look right. 😢 Huge change-set that
is breaking public API (eg. enum for HAService would have to move to abstract class, configurations,
...). I think this could be done properly, but it would definitely take some time (~ 2MD?),
there should be an easier way.
   
   What I can do is to allow passing custom DispatcherResourceManagerComponentFactory into
`TestingMiniCluster` (very similar to what we already do with HighAvailabilityServices). User
would be still able to access methods like `submitJob`, but that would be no different from
real world scenario, where this methods are accessible via RPC.




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message