Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-31398

Don't wrap with TemporaryClassLoaderContext in OperationExecutor

    XMLWordPrintableJSON

Details

    Description

      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.

       

       

      Attachments

        Issue Links

          Activity

            People

              Weijie Guo Weijie Guo
              luoyuxia luoyuxia
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: