问题
Basically, I am using CoFlatMapFunction (https://ci.apache.org/projects/flink/flink-docs-stable/api/java/org/apache/flink/streaming/api/functions/co/CoFlatMapFunction.html) to filter a stream and change the filter parameters at runtime and I am using Flink for that. I want to do the same using Apache Edgent TStream (https://edgent.incubator.apache.org/javadoc/latest/org/apache/edgent/topology/TStream.html), but it does not have CoFlatMapFunction. If I use Union it will not work because the streams are different and I am not allowed to do union. If I use Filter I will not have the dynamic behavior that I want. Any suggestion?
Thanks
回答1:
Using Flink you can force a Union on streams of different types by using Either. It's a bit hacky, but it seems like it could work with Apache Edgent as well.
Updated:
I'm just learning about Edgent, but it seems to have a notion of control streams: https://edgent.apache.org/recipes/recipe_adaptable_filter_range.html.
来源:https://stackoverflow.com/questions/53881770/is-that-possible-to-have-the-same-behavior-of-coflatmapfunction-using-other-basi