wangyang0918 commented on a change in pull request #11010: [FLINK-15836][k8s]
Start a new pods watcher in KubernetesResourceManager when the old one is
closed with exception
URL: https://github.com/apache/flink/pull/11010#discussion_r375818015
##########
File path:
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClient.java
##########
@@ -279,7 +280,7 @@ public void eventReceived(Action action, Pod pod) {
@Override
public void onClose(KubernetesClientException e) {
- LOG.error("The pods watcher is closing.", e);
+ throw new FlinkRuntimeException("The pods
watcher should not be closed.", e);
Review comment:
@tillrohrmann Thanks a lot for your quick review. Yes, you are right. Of
cause, we could not just throw a `FlinkRuntimeException` directly. It needs to
be handled more appropriately. When the pods watcher is closed exceptionally,
it should be handled by the caller. In our case, the`KubernetesResourceManager`
will start a new watch.
----------------------------------------------------------------
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