yittg commented on a change in pull request #16607:
URL: https://github.com/apache/flink/pull/16607#discussion_r679010523



##########
File path: 
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/resources/KubernetesSharedInformer.java
##########
@@ -102,18 +91,31 @@ public Watch watch(
 
     @Override
     public void run() {
-        sharedInformerFactory.startAllRegisteredInformers();
+        startInformerAsync(sharedIndexInformer, aggregatedEventHandler);
     }
 
     @Override
     public void close() {
-        sharedInformerFactory.stopAllRegisteredInformers();
+        this.sharedIndexInformer.stop();
+        ExecutorUtils.gracefulShutdown(5, TimeUnit.SECONDS, 
this.informerExecutor);
     }
 
     private String getResourceKey(String name) {
         return client.getNamespace() + "/" + name;
     }
 
+    private void startInformerAsync(
+            SharedIndexInformer<T> informer, SharedInformerEventListener 
eventListener) {
+        informerExecutor.execute(

Review comment:
       Looks like we don't need run informer here, it has been run while 
invoking `Informable#inform`




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

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


Reply via email to