wangyang0918 commented on a change in pull request #10496: [FLINK-15153]Service 
selector needs to contain jobmanager component label
URL: https://github.com/apache/flink/pull/10496#discussion_r355869450
 
 

 ##########
 File path: 
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/KubernetesClusterDescriptor.java
 ##########
 @@ -108,17 +101,31 @@ public String getClusterDescription() {
 
        @Override
        public ClusterClientProvider<String> retrieve(String clusterId) {
-               return createClusterClientProvider(clusterId);
+               final ClusterClientProvider<String> clusterClientProvider = 
createClusterClientProvider(clusterId);
+
+               try (ClusterClient<String> clusterClient = 
clusterClientProvider.getClusterClient()) {
+                       LOG.info(
+                               "Retrieve flink cluster {} successfully, 
JobManager Web Interface: {}",
+                               clusterId,
+                               clusterClient.getWebInterfaceURL());
+               }
+               return clusterClientProvider;
        }
 
        @Override
        public ClusterClientProvider<String> 
deploySessionCluster(ClusterSpecification clusterSpecification) throws 
ClusterDeploymentException {
-               final ClusterClientProvider<String> clusterClient = 
deployClusterInternal(
+               final ClusterClientProvider<String> clusterClientProvider = 
deployClusterInternal(
                        KubernetesSessionClusterEntrypoint.class.getName(),
                        clusterSpecification,
                        false);
 
-               return clusterClient;
+               try (ClusterClient<String> clusterClient = 
clusterClientProvider.getClusterClient()) {
 
 Review comment:
   If we print the log in `createClusterClientProvider`. Then when we call 
clusterClientProvider.getClusterClient() the logs will show. We create a new 
cluster, the log will show twice and confusing. So i want to separate the log 
of creating and retrieving.
   
   The log is changed when `ClusterClientProvider` is introduced.

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

Reply via email to