[
https://issues.apache.org/jira/browse/FLINK-15635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17018617#comment-17018617
]
Wenlong Lyu edited comment on FLINK-15635 at 1/18/20 3:40 PM:
--------------------------------------------------------------
Thanks [~twalthr] for the explanation. I came to this issue from FLINK-15552,
and thought that this issue is used to track long-term solution for class
loading of sql client and table. I totally agree with you that we can have a
mid-term fix, and introduce more improvements in the future versions.
For mid-term fix, +1 to add an explicit common classloader to replace the need
of thread context classloader, which will also make the code more easy to
understand.
was (Author: wenlong.lwl):
[~twalthr] thanks for the explanation. I came to this issue from FLINK-15552,
and thought that this issue is used to track long-term solution for class
loading of sql client and table. I totally agree with you that we can have a
mid-term fix, and introduce more improvements in the future versions.
For mid-term fix, +1 to add an explicit common classloader to replace the need
of thread context classloader, which will also make the code more easy to
understand.
> Allow passing a ClassLoader to EnvironmentSettings
> --------------------------------------------------
>
> Key: FLINK-15635
> URL: https://issues.apache.org/jira/browse/FLINK-15635
> Project: Flink
> Issue Type: Improvement
> Components: Table SQL / API, Table SQL / Planner
> Reporter: Timo Walther
> Priority: Major
>
> We had a couple of class loading issues in the past because people forgot to
> use the right classloader in {{flink-table}}. The SQL Client executor code
> hacks a classloader into the planner process by using {{wrapClassLoader}}
> that sets the threads context classloader.
> Instead we should allow passing a class loader to environment settings. This
> class loader can be passed to the planner and can be stored in table
> environment, table config, etc. to have a consistent class loading behavior.
> Having this in place should replace the need for
> {{Thread.currentThread().getContextClassLoader()}} in the entire
> {{flink-table}} module.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)