wangyang0918 commented on a change in pull request #10898: 
[FLINK-15632][kubernetes] Make zookeeper HA service could work for active 
kubernetes integration
URL: https://github.com/apache/flink/pull/10898#discussion_r368293694
 
 

 ##########
 File path: 
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/KubernetesClusterDescriptor.java
 ##########
 @@ -84,6 +86,11 @@ public String getClusterDescription() {
                        if (restEndpoint != null) {
                                configuration.setString(RestOptions.ADDRESS, 
restEndpoint.getAddress());
                                configuration.setInteger(RestOptions.PORT, 
restEndpoint.getPort());
+                               // Flink client will not use HA service to 
retrieve address of jobmanager. Instead, it always use Kubernetes
+                               // service to contact with jobmanager via rest 
client.
+                               if 
(HighAvailabilityMode.isHighAvailabilityModeActivated(flinkConfig)) {
 
 Review comment:
   I do not think it is a temporary hack. 
   In Kubernetes deployment, when we want to get a ClusterClient, we should not 
retrieve it from the `ClientHAService`. Instead, we retrieve the rest endpoint 
from Kubernetes service. 
   
   Maybe removing the condition `if 
(HighAvailabilityMode.isHighAvailabilityModeActivated(flinkConfig))` will look 
better. 
   
   ```
   final Endpoint restEndpoint = client.getRestEndpoint(clusterId);
   if (restEndpoint != null) {
     configuration.setString(RestOptions.ADDRESS, restEndpoint.getAddress());
     configuration.setInteger(RestOptions.PORT, restEndpoint.getPort());
   }
   ```

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