I am using flink 1.5.2 to solve a CEP problem.
my data is from a List, some other process will add new Event object to that list while system is running. It is not socket or network message. I've been reading the official site example. Here are the steps I imagine I should be doing.
- create an DataStream using env.fromCollection(list);
- define a Pattern pattern
- get a PatternStream using CEP.pattern(data_stream, pattern)
- use pattern_stream.select( ...implement select interface ...) to get the complex event result as a DataStream
But my input stream should be unbounded. I didn't find any add() method in DataStream<> object. How do I accomplish this? and also, do I need to tell DataStream<> when to clean up obsolete events?