This is expected behavior. Since jar A is on the classpath you are able
to access the entry-class of said jar. When you specify the jar id all
that does is put another jar on the classpath; it is not enforce that
the entry-class is loaded from said jar.
On 08/01/2022 16:45, Qihua Yang wrote:
Hi Yun,
Thank you for your reply! testB.jar doesn't have the same entry class
as testA.jar.
So is it expected behavior? What is the theory behind?
Thanks,
Qihua
On Fri, Jan 7, 2022 at 4:27 PM Yun Gao <yungao...@aliyun.com> wrote:
Hi Qihua
Sorry may I double confirm that whether the entry class exists in
both testA and testB?
IF testA.jar is included on startup, it would be loaded in the
parent classloader, which
is the parent classloader for the user classloader that loads
testB. Thus at least if the
entry-class is exist only in testA, it should still be found.
Best,
Yun
------------------------------------------------------------------
Sender:Qihua Yang<yang...@gmail.com>
Date:2022/01/07 02:55:09
Recipient:user<user@flink.apache.org>
Theme:Flink rest api to start a job
Hi,
I found a weird behavior. We launched a k8s cluster without
job. But includes the jar A. I use Flink rest api to upload a
dummy jar(actually it can be any jar). Flink will create a jar
id. Then I use rest api to start the job with the jar A
entry-class. But the jar id is the dummy jar id. Flink will
start the job from jar A. Anyone know why?
My understanding is flink rest api should start the job from
the dummy jar, because jar id is dummy jar id that I uploaded.
Here are steps what I did:
1. deploy a k8s pod contains working jar(testA.jar)
1. flink rest api upload jar, testB.jar, flink generate jar
id, 2d6a9263-c9d3-4f23-9f59-fc3594aadf0c_job.jar
2. flink rest api to runJar with testB.jar id, but testA.jar
entry-class.
3. flink start job from testA.jar
Thanks,
Qihua