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

ASF GitHub Bot commented on FLINK-7656:
---------------------------------------

Github user aljoscha commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4690#discussion_r140515705
  
    --- Diff: 
flink-runtime/src/test/java/org/apache/flink/runtime/jobgraph/JobTaskVertexTest.java
 ---
    @@ -84,10 +88,10 @@ public void testConnectMultipleTargets() {
        @Test
        public void testOutputFormatVertex() {
                try {
    -                   final TestingOutputFormat outputFormat = new 
TestingOutputFormat();
    +                   final OutputFormat outputFormat = new 
TestingOutputFormat();
                        final OutputFormatVertex of = new 
OutputFormatVertex("Name");
                        new 
TaskConfig(of.getConfiguration()).setStubWrapper(new 
UserCodeObjectWrapper<OutputFormat<?>>(outputFormat));
    -                   final ClassLoader cl = getClass().getClassLoader();
    +                   final ClassLoader cl = new FlinkUserCodeClassLoader(new 
URL[0], getClass().getClassLoader());
    --- End diff --
    
    This doesn't exist anymore but you can use 
`FlinkUserCodeClassLoaders.childFirst()`/`parentFirst()`.


> Switch to user ClassLoader when invoking initializeOnMaster finalizeOnMaster
> ----------------------------------------------------------------------------
>
>                 Key: FLINK-7656
>                 URL: https://issues.apache.org/jira/browse/FLINK-7656
>             Project: Flink
>          Issue Type: Bug
>          Components: Local Runtime
>    Affects Versions: 1.3.2
>            Reporter: Fabian Hueske
>            Assignee: Fabian Hueske
>
> The contract that Flink provides to usercode is that that the usercode 
> classloader is the context classloader whenever usercode is called.
> In {{OutputFormatVertex}} usercode is called in the {{initializeOnMaster()}} 
> and {{finalizeOnMaster()}} methods but the context classloader is not set to 
> the usercode classloader.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to