Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2456#discussion_r77508870
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/tasks/InputSplitProvider.java
 ---
    @@ -35,4 +35,16 @@
         *         task shall not consume any further input splits.
         */
        InputSplit getNextInputSplit();
    +
    +   /**
    +    * Starts the input split provider with a user code class loader.
    +    *
    +    * @param userCodeClassLoader User code class loader to use by the 
input split provider
    +    */
    +   void start(ClassLoader userCodeClassLoader);
    --- End diff --
    
    The `start` method's intention is to pass in the `userCodeClassLoader` 
which is currently created in `Task#run` method. There are two other ways to 
solve the problem. Either creating the user code class loader outside of `Task` 
where the `InputSplitProvider` is created or to pass the user code class loader 
via the `getNextInputSplit` method call to the input split provider.
    
    For the first approach: Creating the user code class loader is a blocking 
operation, so this would have to executed in a future and upon completion we 
could create the `Task` instance in the `TaskManager`.
    
    
    For the second approach: We would have to touch more code but I think 
everywhere were the `getNextInputSplit` method is called, we have access to the 
user code class loader.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to