tillrohrmann commented on a change in pull request #9609: 
[FLINK-13750][client][coordination] Separate HA services between client-side 
and server-side
URL: https://github.com/apache/flink/pull/9609#discussion_r320665466
 
 

 ##########
 File path: 
flink-clients/src/main/java/org/apache/flink/client/program/ClusterClient.java
 ##########
 @@ -103,55 +94,21 @@
         * if that is not possible.
         *
         * @param flinkConfig The config used to obtain the job-manager's 
address, and used to configure the optimizer.
-        *
-        * @throws Exception we cannot create the high availability services
         */
-       public ClusterClient(Configuration flinkConfig) throws Exception {
-               this(
-                       flinkConfig,
-                       
HighAvailabilityServicesUtils.createHighAvailabilityServices(
-                               flinkConfig,
-                               Executors.directExecutor(),
-                               
HighAvailabilityServicesUtils.AddressResolution.TRY_ADDRESS_RESOLUTION),
-                       false);
-       }
-
-       /**
-        * Creates a instance that submits the programs to the JobManager 
defined in the
-        * configuration. This method will try to resolve the JobManager 
hostname and throw an exception
-        * if that is not possible.
-        *
-        * @param flinkConfig The config used to obtain the job-manager's 
address, and used to configure the optimizer.
-        * @param highAvailabilityServices HighAvailabilityServices to use for 
leader retrieval
-        * @param sharedHaServices true if the HighAvailabilityServices are 
shared and must not be shut down
-        */
-       public ClusterClient(
-                       Configuration flinkConfig,
-                       HighAvailabilityServices highAvailabilityServices,
-                       boolean sharedHaServices) {
+       public ClusterClient(Configuration flinkConfig) {
                this.flinkConfig = Preconditions.checkNotNull(flinkConfig);
                this.compiler = new Optimizer(new DataStatistics(), new 
DefaultCostEstimator(), flinkConfig);
-
                this.timeout = AkkaUtils.getClientTimeout(flinkConfig);
-
-               this.highAvailabilityServices = 
Preconditions.checkNotNull(highAvailabilityServices);
-               this.sharedHaServices = sharedHaServices;
        }
 
        // 
------------------------------------------------------------------------
        //  Startup & Shutdown
        // 
------------------------------------------------------------------------
 
        /**
-        * Shuts down the client. This stops the internal actor system and 
actors.
+        * Shuts down the client. This stops possible internal services.
         */
-       public void shutdown() throws Exception {
-               synchronized (this) {
-                       if (!sharedHaServices && highAvailabilityServices != 
null) {
-                               highAvailabilityServices.close();
-                       }
-               }
-       }
+       public abstract void shutdown() throws Exception;
 
 Review comment:
   Could this have an empty implementation?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to