Configure classes

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Configure classes

Abhinav Sharma
Hi
I am evaluating flink with use case where we need to create a basic flink pipeline, and inject the classes for map, reduce, process, etc via some xml configuration (or something equivalent).
Eg:

stream.keyBy(value -> value.getKey()) .window(TumblingProcessingWindow.of(Time.miuntes(1)))
.process(new MyInjectedClass());

Is something like this possible, where a developer can just write MyInjectedClass, and configure it without writing code in flink app? The developer needs to write just the process class, and specify which step in pipeline to inject the class.
Reply | Threaded
Open this post in threaded view
|

Re: Configure classes

Till Rohrmann
Hi Abhinav,

out of the box Flink does not support what you are asking for. If you want to minimize the amount of Flink code to write, then I would recommend looking at Flink's SQL API [1]. For more advanced injection logic I think you have to write a bit of tooling on your own.


Cheers,
Till

On Wed, Feb 17, 2021 at 3:58 AM Abhinav Sharma <[hidden email]> wrote:
Hi
I am evaluating flink with use case where we need to create a basic flink pipeline, and inject the classes for map, reduce, process, etc via some xml configuration (or something equivalent).
Eg:

stream.keyBy(value -> value.getKey()) .window(TumblingProcessingWindow.of(Time.miuntes(1)))
.process(new MyInjectedClass());

Is something like this possible, where a developer can just write MyInjectedClass, and configure it without writing code in flink app? The developer needs to write just the process class, and specify which step in pipeline to inject the class.