You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Data Engineer <da...@gmail.com> on 2018/02/06 06:55:58 UTC

Testing flink class loading

I am trying to run the ClassLoaderTestProgram on flink.

1. I have started Flink in local mode with the following command:
      bin/jobmanager.sh start local

2. I ran the  ClassLoaderTestProgram  jar:
       bin/flink run ClassLoaderTestProgram.jar --resolve-first child
--output out.txt

I get a  java.lang.NoSuchMethodError:
org.apache.flink.runtime.taskmanager.TaskManager.getMessage when I run with
child-first, and I get the output when I run it in parent-first mode.

The documentation states that "we get a {@link NoSuchMethodError} if we're
running with {@code parent-first} class loading
  and that we get the correct result from the method when we're running
with {@code child-first} class loading."

Am I doing something wrong here?

Regards,
James

Re: Testing flink class loading

Posted by Aljoscha Krettek <al...@apache.org>.
Hi,

You can take a look at test-infra/end-to-end-test/test_streaming_classloader.sh to see how that testing job is used in the actual test.

Best,
Aljoscha

> On 6. Feb 2018, at 07:55, Data Engineer <da...@gmail.com> wrote:
> 
> I am trying to run the ClassLoaderTestProgram on flink.
> 
> 1. I have started Flink in local mode with the following command:
>       bin/jobmanager.sh start local
> 
> 2. I ran the  ClassLoaderTestProgram  jar:
>        bin/flink run ClassLoaderTestProgram.jar --resolve-first child --output out.txt
> 
> I get a  java.lang.NoSuchMethodError: org.apache.flink.runtime.taskmanager.TaskManager.getMessage when I run with child-first, and I get the output when I run it in parent-first mode.
> 
> The documentation states that "we get a {@link NoSuchMethodError} if we're running with {@code parent-first} class loading
>   and that we get the correct result from the method when we're running with {@code child-first} class loading."
> 
> Am I doing something wrong here?
> 
> Regards,
> James