[ https://issues.apache.org/jira/browse/FLINK-7442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16130810#comment-16130810 ]
ASF GitHub Bot commented on FLINK-7442: --------------------------------------- Github user StephanEwen commented on the issue: https://github.com/apache/flink/pull/4554 I took only a very brief look at this, but I am not totally sure whether the `ChildFirstClassLoader` implementation is actually correct. Even if it is, it seems to do redundant work, like looking at the URLs twice (in the `findClass(name);` call and the `super.loadClass(name, resolve);` call). We have a working version of a ChildFirstClassLoader here, why not use that? Is that implementation suboptimal? https://github.com/apache/flink/blob/fa11845b926f8371e9cee47775ca0e48176b686e/flink-contrib/flink-statebackend-rocksdb/src/test/java/org/apache/flink/contrib/streaming/state/RocksDbMultiClassLoaderTest.java#L78 We should also never reference the System Classloader directly, it breaks all embedded setups or service architecture (OSGI) setups where you end up with hierarchical class loaders. My feeling is also that this does many changes that may not be necessary, like change the setup of the client, packaged program, etc. Passing the configuration through everything makes this change rather involved. I was wondering if it is not sufficient to simply let the TaskManager pass this as a flag to the library cache manager. Then you would not need to pass configs everywhere - the only ever config access is by the TaskManager or Task when it creates the classloader, and the config is available there anyways. Concerning class loader setup on the client - not sure if we should change this in the same PR. This is probably much less critical (the main method does not instantiate many of the dependencies) and that part changes so heavily with flip-6 already. Various setups may not even have separate classloaders on the client anyways, but everything is in the app class loader there. > Add option for using a child-first classloader for loading user code > -------------------------------------------------------------------- > > Key: FLINK-7442 > URL: https://issues.apache.org/jira/browse/FLINK-7442 > Project: Flink > Issue Type: Improvement > Components: Local Runtime > Reporter: Aljoscha Krettek > Assignee: Aljoscha Krettek > -- This message was sent by Atlassian JIRA (v6.4.14#64029)