You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Hequn Cheng (JIRA)" <ji...@apache.org> on 2018/12/02 06:39:00 UTC

[jira] [Updated] (FLINK-11045) UserCodeClassLoader has not been set correctly for RuntimeUDFContext in CollectionExecutor

     [ https://issues.apache.org/jira/browse/FLINK-11045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hequn Cheng updated FLINK-11045:
--------------------------------
    Description: 
We should use {{UserCodeClassLoader}} when new a {{RuntimeUDFContext}}.

i.e., Change the code from
{code:java}
this.classLoader = getClass().getClassLoader();

new RuntimeUDFContext(taskInfo, classLoader, executionConfig, cachedFiles, accumulators, metrics)
{code}
to
{code:java}
new RuntimeUDFContext(taskInfo, Thread.currentThread().getContextClassLoader, executionConfig, cachedFiles, accumulators, metrics)
{code}
in {{CollectionExecutor}}.

FYI. This is a problem reported from the [user mailing list|http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Table-API-example-Table-program-cannot-be-compiled-This-is-a-bug-Please-file-an-issue-td24852.html].

  was:
We should use {{UserCodeClassLoader}} when new a {{RuntimeUDFContext}}.

i.e., Change the code from
{code:java}
this.classLoader = getClass().getClassLoader();

new RuntimeUDFContext(taskInfo, classLoader, executionConfig, cachedFiles, accumulators, metrics)
{code}
to
{code:java}
new RuntimeUDFContext(taskInfo, Thread.currentThread().getContextClassLoader, executionConfig, cachedFiles, accumulators, metrics)
{code}
in {{CollectionExecutor}}.


> UserCodeClassLoader has not been set correctly for RuntimeUDFContext in CollectionExecutor
> ------------------------------------------------------------------------------------------
>
>                 Key: FLINK-11045
>                 URL: https://issues.apache.org/jira/browse/FLINK-11045
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API &amp; SQL
>            Reporter: Hequn Cheng
>            Assignee: Hequn Cheng
>            Priority: Major
>
> We should use {{UserCodeClassLoader}} when new a {{RuntimeUDFContext}}.
> i.e., Change the code from
> {code:java}
> this.classLoader = getClass().getClassLoader();
> new RuntimeUDFContext(taskInfo, classLoader, executionConfig, cachedFiles, accumulators, metrics)
> {code}
> to
> {code:java}
> new RuntimeUDFContext(taskInfo, Thread.currentThread().getContextClassLoader, executionConfig, cachedFiles, accumulators, metrics)
> {code}
> in {{CollectionExecutor}}.
> FYI. This is a problem reported from the [user mailing list|http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Table-API-example-Table-program-cannot-be-compiled-This-is-a-bug-Please-file-an-issue-td24852.html].



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)