I am observing odd memory behavior with the CEP library and I am wondering if it is expected.
If I write a simple local streaming Flink job that reads from a 65MB compressed file of JSON objects, one per line, parses the JSON, performs a filter operation, and then a keyBy, heap usage is stable, staying below 250MB throughout per VisualVM. But if I create a CEP pattern that matches nothing (Pattern.begin[T]("foo").where( _ => false )) and match it against the stream produced by the last keyBy (CEP.pattern(stream, pattern).select), then memory balloons until the program terminates, steadily growing until 3GB. The VisualVM memory profiler appears unable to account for that used heap space. If I add the Live Bytes column I'd get only between 200-100 MB. Any idea what is going on? Flink 1.2. Java 8.