Re: Flink UDF registration from jar at runtime

2021-01-07 Thread Jakub N
undException: StringFunc`. As mentioned in the code, the commented line surprisingly works as intended. Do you have any ideas on why this the case? Kind regards, Jakub Von: Dawid Wysakowicz Gesendet: Donnerstag, 10. Dezember 2020 21:32 Bis: Jakub N Cc: user@flink.ap

Re: Flink UDF registration from jar at runtime

2020-12-13 Thread Jakub N
, f0 FROM recipes").print(); } This leads to a `java.lang.ClassNotFoundException: StringFunc`. As mentioned in the code, the commented line surprisingly works as intended. Do you have any ideas on why this the case? Kind regards, Jakub ________ Von: Dawid Wysakowic

Re: Flink UDF registration from jar at runtime

2020-12-10 Thread Dawid Wysakowicz
On Tue, Dec 8, 2020 at 2:53 AM Jakub N > <mailto:jakub1...@hotmail.de>> wrote: >> >> Hi Guowei, >> >> It turned out for my application I unfortunately can't have >> the UDF in the "job's"  classpath. As I am usi

Re: Flink UDF registration from jar at runtime

2020-12-10 Thread Jakub N
ou were proposing? Kind regards, Jakub Von: Dawid Wysakowicz Gesendet: Donnerstag, 10. Dezember 2020 09:59 Bis: Guowei Ma; Jakub N Cc: user@flink.apache.org Betreff: Re: Flink UDF registration from jar at runtime Hi Jakub, As Guowei said the UDF must be present in the user classloader. It m

Re: Flink UDF registration from jar at runtime

2020-12-10 Thread Dawid Wysakowicz
; > *Von:* Guowei Ma mailto:guowei....@gmail.com>> > *Gesendet:* Dienstag, 8. Dezember 2020 06:34 > *An:* Jakub N mailto:jakub1...@hotmail.de>> > *Cc:* user@flink.apache.org <mailto:u

Re: Flink UDF registration from jar at runtime

2020-12-10 Thread Guowei Ma
es if any of these explanations are unclear or too vague. > > Kind regards, > > Jakub > > ---------- > *Von:* Guowei Ma > *Gesendet:* Dienstag, 8. Dezember 2020 06:34 > *An:* Jakub N > *Cc:* user@flink.apache.org > *Betreff:* Re: Flink UDF regist

AW: Flink UDF registration from jar at runtime

2020-12-08 Thread Jakub N
tag, 8. Dezember 2020 06:34 An: Jakub N Cc: user@flink.apache.org Betreff: Re: Flink UDF registration from jar at runtime Hi, Jakub I am not familiar with the `sbt pack`. But I assume you are doing following (correct me if I misunderstand you) 1. The UDF and Job jar are in the same "fatjar

Re: Flink UDF registration from jar at runtime

2020-12-07 Thread Guowei Ma
s to add these UDF's from outside the classpath? > > Kind regards, > > Jakub > > -- > *Von:* Jakub N > *Gesendet:* Montag, 7. Dezember 2020 12:59 > *An:* Guowei Ma > *Cc:* user@flink.apache.org > *Betreff:* Re: Flink UDF registration from jar at runtime

Re: Flink UDF registration from jar at runtime

2020-12-07 Thread Jakub N
path (when the project is packed). Are there any ways to add these UDF's from outside the classpath? Kind regards, Jakub Von: Jakub N Gesendet: Montag, 7. Dezember 2020 12:59 An: Guowei Ma Cc: user@flink.apache.org Betreff: Re: Flink UDF registration from jar

Re: Flink UDF registration from jar at runtime

2020-12-07 Thread Jakub N
Betreff: Re: Flink UDF registration from jar at runtime Hi Jakub, I think the problem is that the `cls`, which you load at runtime, is not in the thread context classloader. Flink deserializes the `myFunction` object with the context classloader. So maybe you could put the myFunction in the job&#

Re: Flink UDF registration from jar at runtime

2020-12-07 Thread Guowei Ma
relevant information is missing, alternatively > you can also have a look at the source code here ( > https://github.com/codefeedr/kafkaquery). > > Kind regards, > > Jakub > > > -- > *Von:* Guowei Ma > *Gesendet:* Montag, 7. Dezember 2020

AW: Flink UDF registration from jar at runtime

2020-12-07 Thread Jakub N
ed Let me know if any other relevant information is missing, alternatively you can also have a look at the source code here (https://github.com/codefeedr/kafkaquery). Kind regards, Jakub Von: Guowei Ma Gesendet: Montag, 7. Dezember 2020 02:55 An: Jakub N Cc: user@fl

Re: Flink UDF registration from jar at runtime

2020-12-06 Thread Guowei Ma
Hi, Jakub In theory there should not be any problem because you could register the function object. So would you like to share your code and the shell command that you submit your job? Best, Guowei On Mon, Dec 7, 2020 at 3:19 AM Jakub N wrote: > The current setup is: Data in Kafka -> Kafka Conn

Flink UDF registration from jar at runtime

2020-12-06 Thread Jakub N
The current setup is: Data in Kafka -> Kafka Connector -> StreamTableEnvironment -> execute Flink SQL queries I would like to register Flink's User-defined Functions from a jar or java class file during runtime. What I have tried so far is using Java's Classloader getting an instance of a Scala