[GitHub] [flink] wangyang0918 commented on pull request #14692: [FLINK-20944][k8s] Do not resolve the rest endpoint address when creating the RestClusterClient

2021-01-20 Thread GitBox


wangyang0918 commented on pull request #14692:
URL: https://github.com/apache/flink/pull/14692#issuecomment-763683363


   > We still create the RestClusterClient when deploying application/session 
and retrieving. For deploying, it is only used to print the web interface URL. 
For retrieving, it will be used to talk to the cluster.
   > Based on above, we will use NO_ADDRESS_RESOLUTION for deploying and 
TRY_ADDRESS_RESOLUTION for retrieving.
   
   Hmm. Maybe I do not make myself clear. The above solution is only for 
Kubernetes. For Yarn, we indeed have the issue for per-job cluster. Just like 
you said, on a high level scope, I think we do not have a very good abstraction 
for all `ClusterDescriptor` now, when we need to create a `RestClusterClient` 
or not. As well as when and how to print the web interface URL.
   
   I will update the PR to the initial solution.



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




[GitHub] [flink] wangyang0918 commented on pull request #14692: [FLINK-20944][k8s] Do not resolve the rest endpoint address when creating the RestClusterClient

2021-01-20 Thread GitBox


wangyang0918 commented on pull request #14692:
URL: https://github.com/apache/flink/pull/14692#issuecomment-763489671


   > You mean when not using ClusterIP, right?
   
   No, I mean to add a log to remind users rest endpoint could only be used in 
the K8s cluster when using `ClusterIP`. Let's forget it and try to make us on 
the same page.
   
   > Would it make sense to say that we don't create a ClusterClient if we 
submit the cluster in detached mode? At the moment, this is not the case but it 
might make things a bit clearer.
   
   I agree with you that Flink client should fail if we could not connect to 
the cluster(e.g. not being able to resolve the address).
   But for both the detached and attached application mode, Flink client does 
not need to talk to the cluster. Because the submission process actually happen 
on the JobManager side. The Flink client just needs to tell the K8s to create 
the resources.
   When running `flink list/cancel/savepoint`, we need to talk to the cluster. 
In such case, we should let the Flink client fails if we could not talk to the 
cluster.
   
   > Another question, why does the 
KubernetesClusterDescriptor.deployApplicationCluster log the web interface URL?
   
   Printing the web interface URL will help the users to quickly access the 
dashboard. I think in Yarn deployment, we have a similar log.
   ```
   2021-01-20 17:54:31,270 INFO  org.apache.flink.yarn.YarnClusterDescriptor
  [] - Found Web Interface host11.xxx:64114 of application 
'application_1602580065114_1123'.
   ```



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