zhengcanbin commented on a change in pull request #11010: [FLINK-15836][k8s] Throw fatal error in KubernetesResourceManager when the pods watcher is closed with exception URL: https://github.com/apache/flink/pull/11010#discussion_r410823754
########## File path: flink-kubernetes/src/main/java/org/apache/flink/kubernetes/KubernetesResourceManager.java ########## @@ -148,6 +156,7 @@ protected void initialize() throws ResourceManagerException { Throwable exception = null; try { + podsWatch.close(); Review comment: If an Exception is thrown by `podsWatch.close`, `kubeClient.close` would not be called. I think it would be better to separately enclose them into different try-catch blocks. ---------------------------------------------------------------- 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