Hi Pedro,
you can have dynamic windows by assigning the windows to elements in your Processor (so you would need to extend that type to have a field for the window). Then, you can write a custom WindowAssigner that will simply get the window from an event and assign that as the internal window.

Please let me know if you need more details.


On Thu, 3 Nov 2016 at 18:40 PedroMrChaves <pedro.mr.chaves@gmail.com> wrote:

Your tip was very helpful and I took a similar approach.

I have something like this:
class Processor extends RichCoFlatMapFunction<Event, Rule, String> {
    public void flatMap1(Event event, Collector<String> out) {
         process(event,out); // run the javscript (rules)  against the
incoming events

    public void flatMap2(Rule rule , Collector<String> out) {
      // We add the rule to the list of existing rules

But know I face a new challenge, I don't have access to the windowed
constructs of flink and I can't dynamically create new window aggregations
inside the flatMap. At least not that I know of.

Did you face a similar problem? Any Ideas?

Thank you and regards,
Pedro Chaves

View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/What-is-the-best-way-to-load-add-patterns-dynamically-at-runtime-with-Flink-tp9461p9876.html
Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.