wangyang0918 commented on a change in pull request #11010:
URL: https://github.com/apache/flink/pull/11010#discussion_r425546588



##########
File path: 
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/FlinkKubeClient.java
##########
@@ -96,9 +98,10 @@
         * Watch the pods selected by labels and do the {@link 
PodCallbackHandler}.
         *
         * @param labels labels to filter the pods to watch
-        * @param callbackHandler {@link PodCallbackHandler} will be called 
when the watcher receive the corresponding events.
+        * @param podsWatcher watcher used to process the {@link 
PodCallbackHandler}
+        * @return Return a watch for pods. It needs to be closed after use.
         */
-       void watchPodsAndDoCallback(Map<String, String> labels, 
PodCallbackHandler callbackHandler);
+       KubernetesWatch watchPodsAndDoCallback(Map<String, String> labels, 
KubernetesPodsWatcher podsWatcher);

Review comment:
       You are right. Adding the argument `KubernetesPodsWatcher` will break 
the abstraction of `FlinkKubeClient` API. I will move it to a new method 
`PodCallbackHandler#handleFatalError`.




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


Reply via email to