You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Abhinav Sharma <ab...@gmail.com> on 2021/02/17 02:57:29 UTC

Configure classes

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.

Re: Configure classes

Posted by Till Rohrmann <tr...@apache.org>.
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.

[1] https://ci.apache.org/projects/flink/flink-docs-stable/dev/table/sql/

Cheers,
Till

On Wed, Feb 17, 2021 at 3:58 AM Abhinav Sharma <ab...@gmail.com>
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.
>