[ 
https://issues.apache.org/jira/browse/FLINK-31398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17714809#comment-17714809
 ] 

Weijie Guo edited comment on FLINK-31398 at 4/21/23 5:17 PM:
-------------------------------------------------------------

master(1.18) via 921267bcd06c586d4fad28bbf37b4532593c9e3c.
release-1.17 via d40d4dd26ac544307583477b6930e7af50330935.


was (Author: weijie guo):
master(1.18) via 921267bcd06c586d4fad28bbf37b4532593c9e3c.

> Don't wrap with TemporaryClassLoaderContext in OperationExecutor
> ----------------------------------------------------------------
>
>                 Key: FLINK-31398
>                 URL: https://issues.apache.org/jira/browse/FLINK-31398
>             Project: Flink
>          Issue Type: Improvement
>          Components: Connectors / Hive, Table SQL / Client
>            Reporter: luoyuxia
>            Assignee: Weijie Guo
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.18.0
>
>
> Currently, method OperationExecutor#executeStatement in sql client will wrap 
> currently with `
> sessionContext.getSessionState().resourceManager.getUserClassLoader()`. 
> Actually, it's not necessary. What' worse, 
> it'll will cause the exception 'Trying to access closed classloader. Please 
> check if you store xxx'  after quiting sql client. 
> The reason is in `ShutdownHookManager`, it will register a hook after jvm 
> shutdown. In `ShutdownHookManager`, it will
> create `Configuration`. It will then access 
> `Thread.currentThread().getContextClassLoader()` which is 
> FlinkUserClassLoader, the FlinkUserClassLoader has been closed before. So, 
> it'll then cause `'Trying to access closed classloader` exception.
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to