Is that possible to have the same behavior of CoFlatMapFunction using other basic operators?

强颜欢笑 提交于 2019-12-25 03:44:42

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!