XComp commented on code in PR #25027:
URL: https://github.com/apache/flink/pull/25027#discussion_r1686411653


##########
flink-runtime/src/main/java/org/apache/flink/runtime/dispatcher/DefaultJobManagerRunnerRegistry.java:
##########
@@ -97,6 +106,14 @@ public JobManagerRunner unregister(JobID jobId) {
         return this.jobManagerRunners.remove(jobId);
     }
 
+    public void setMainThreadExecutor(ComponentMainThreadExecutor executor) {
+        mainThreadExecutor = executor;
+    }
+
+    public ComponentMainThreadExecutor getMainThreadExecutor() {
+        return mainThreadExecutor;
+    }
+

Review Comment:
   JobManagerRunnerRegistry would implement 
`LocallyCleanableInMainThreadResource` instead of `LocallyCleanableResource`. 
The conversion of the `LocallyCleanableInMainThreadResource#localCleanupAsync` 
callback to the `LocallyCleanableResource#localCleanupAsync` callback would 
then happen in 
`DispatcherResourceCleanerFactory#create[Loc|Glob]alResourceCleaner`.



##########
flink-runtime/src/main/java/org/apache/flink/runtime/dispatcher/DefaultJobManagerRunnerRegistry.java:
##########
@@ -97,6 +106,14 @@ public JobManagerRunner unregister(JobID jobId) {
         return this.jobManagerRunners.remove(jobId);
     }
 
+    public void setMainThreadExecutor(ComponentMainThreadExecutor executor) {
+        mainThreadExecutor = executor;
+    }
+
+    public ComponentMainThreadExecutor getMainThreadExecutor() {
+        return mainThreadExecutor;
+    }
+

Review Comment:
   `JobManagerRunnerRegistry` would implement 
`LocallyCleanableInMainThreadResource` instead of `LocallyCleanableResource`. 
The conversion of the `LocallyCleanableInMainThreadResource#localCleanupAsync` 
callback to the `LocallyCleanableResource#localCleanupAsync` callback would 
then happen in 
`DispatcherResourceCleanerFactory#create[Loc|Glob]alResourceCleaner`.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to