[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamical Windows

Awesome, thank you very much I will try to do it with key selector to send the key from the front end

El mié., 1 ago. 2018 a las 11:57, vino yang (<yanghua1127@xxxxxxxxx>) escribió:

2018-08-01 23:57 GMT+08:00 vino yang <yanghua1127@xxxxxxxxx>:
Hi antonio,

The keyBy API can accept a KeySelector [1] which is a interface you can implement to specify the key for your business.

I think you can use it and implement its getKey method. In the method, you can access outer system (such as Zookeeper) to get a dynamic key.

It's just an idea, you can try it.

Thanks, vino.

2018-08-01 23:46 GMT+08:00 antonio saldivar <ansale10@xxxxxxxxx>:

I am developing a Flink 1.4.2 application currently with sliding windows (Example below)
I want to ask if there is a way to create the window time dynamically also the key has to change in some Use Cases and we don't want to create an specific window for each UC

I want to send those values from the front end

SingleOutputStreamOperator<Object> windowed = ObjectDTO



.trigger(new AlertTrigger(env.getStreamTimeCharacteristic()))

.aggregate(new TxnAggregator(), new TxnWindowFn())


Thank you
Best Regards