StephanEwen commented on a change in pull request #14143:
URL: https://github.com/apache/flink/pull/14143#discussion_r528214330



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/source/coordinator/SourceCoordinatorProvider.java
##########
@@ -81,11 +81,13 @@ public OperatorCoordinator 
getCoordinator(OperatorCoordinator.Context context) t
         */
        public static class CoordinatorExecutorThreadFactory implements 
ThreadFactory {
                private final String coordinatorThreadName;
+               private final ClassLoader cl;
                private Thread t;
 
                CoordinatorExecutorThreadFactory(String coordinatorThreadName) {
                        this.coordinatorThreadName = coordinatorThreadName;
                        this.t = null;
+                       this.cl = 
Thread.currentThread().getContextClassLoader();

Review comment:
       I think it would be safer to pass the user code classloader here 
directly, rather than relying on the context class loader. That seems fragile.

##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/RecreateOnResetOperatorCoordinator.java
##########
@@ -55,6 +57,7 @@ private RecreateOnResetOperatorCoordinator(
                        long closingTimeoutMs) throws Exception {
                this.context = context;
                this.provider = provider;
+               this.userClassLoader = 
Thread.currentThread().getContextClassLoader();

Review comment:
       Same as above.




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