Re: Compile flink file with external jar

2015-09-21 Thread Giacomo Licari
Hi guys, Janino works perfectly! It allows to create entire classes on-the-fly and to use them. Thank you a lot. Cheers, Giacomo On Mon, Sep 21, 2015 at 7:49 PM, Giacomo Licari wrote: > Thanks a lot Fabian, > I will try it. > > Cheers, > Giacomo > > On Mon, Sep 21, 2015 at 7:35 PM, Fabian Hue

Re: Compile flink file with external jar

2015-09-21 Thread Giacomo Licari
Thanks a lot Fabian, I will try it. Cheers, Giacomo On Mon, Sep 21, 2015 at 7:35 PM, Fabian Hueske wrote: > Hi Giacomo, > > you could use Janino [1] to directly compile the code string into a class > and execute it. The program does not need to be shipped to the cluster if > all user functions

Re: Compile flink file with external jar

2015-09-21 Thread Fabian Hueske
Hi Giacomo, you could use Janino [1] to directly compile the code string into a class and execute it. The program does not need to be shipped to the cluster if all user functions are contained in the jar. Cheers, Fabian [1] http://unkrig.de/w/Janino On Sep 21, 2015 7:08 PM, "Giacomo Licari" wro

Re: Compile flink file with external jar

2015-09-21 Thread Giacomo Licari
Hi Robert, thanks for the reply. I receive a JSON from my client interface, which contains the dataflow description. Then I parse that JSON and the parser creates a string which contains the Flink code, as the user can modify the dataflow, the description can change every time it calls "Execute Dat

Re: Compile flink file with external jar

2015-09-21 Thread Robert Metzger
Hi, you have to make sure that the Flink classes are contained in your class path. Either add the flink-dist jar from the binary distribution to your class path, or use maven to build the backend.jar as a fat jar. Why are you generating a java class from your dataflows? Isn't it easier to just ca

Compile flink file with external jar

2015-09-21 Thread Giacomo Licari
Hi guys, I'm developing a dataflow client whose backend, exported as jar, allows users to convert dataflows to a Flink file .java with some code inside. The generated file naturally calls some classes I have in jar file, like MapFunction, DataSet. My question is: How to compile the generated file