flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From StephanEwen <...@git.apache.org>
Subject [GitHub] flink issue #4554: [FLINK-7442] Add option for using child-first classloader...
Date Thu, 17 Aug 2017 16:51:55 GMT
Github user StephanEwen commented on the issue:

    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);`
    We have a working version of a ChildFirstClassLoader here, why not use that? Is that implementation
    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.

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 infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message