You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Chesnay Schepler (JIRA)" <ji...@apache.org> on 2018/07/13 09:30:00 UTC
[jira] [Created] (FLINK-9844) PackagedProgram does not close
URLClassLoader
Chesnay Schepler created FLINK-9844:
---------------------------------------
Summary: PackagedProgram does not close URLClassLoader
Key: FLINK-9844
URL: https://issues.apache.org/jira/browse/FLINK-9844
Project: Flink
Issue Type: Improvement
Components: Core, Job-Submission
Reporter: Chesnay Schepler
The {{PackagedProgram}} class creates a user-code classloader to execute the programs {{main}} method.
This classloader is a {{URLClassLoader}} (except in the case of some tests), which contains opened {{JarFiles}} for all accessed jars.
The {{URLClassLoader}} class implements {{Closeable}} for the purpose of cleaning up closeable resources, however we never actually call this method. The {{PackagedProgram}} only works against the {{ClassLoader}} class, which doesn't implement {{Closeable}}.
As a result, deleting a jar after submitting it with the {{JarRunHandler}} currently fails on Windows, since the jar is still in use.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)