bgeng777 commented on a change in pull request #62:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/62#discussion_r827092937



##########
File path: 
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/service/FlinkService.java
##########
@@ -129,6 +129,16 @@ public boolean isJobManagerPortReady(Configuration config) 
{
         return false;
     }
 
+    public boolean isJobManagerServing(Configuration config) {
+        try (ClusterClient<String> clusterClient = getClusterClient(config)) {
+            clusterClient.listJobs().get(10, TimeUnit.SECONDS);
+            return true;

Review comment:
       `getWebInterfaceURL` is neat but one drawback of 
`clusterClient#getWebInterfaceURL` is that it only returns the current web 
url(i.e. address of the leader of jm) but does not guarantee the JM can 
actually work. In `isJobManagerPortReady`, we currently have already used 
`getWebInterfaceURL` and will 'telnet' the port in the url. In the jira, we 
think it may not be enough and that's why I finally choose the `listJob` call.




-- 
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: commits-unsubscr...@flink.apache.org

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


Reply via email to