基本上,我使用 CoFlatMapFunction ( https://ci.apache.org/projects/flink/flink-docs-stable/api/java/org/apache/flink/streaming/api/functions/co/CoFlatMapFunction.html ) 来过滤流并在运行时更改过滤器参数,并且我使用 Flink 来实现这一点。我想使用 Apache Edgent TStream ( https://edgent.incubator.apache.org/javadoc/latest/org/apache/edgent/topology/TStream.html ) 执行相同的操作,但它没有 CoFlatMapFunction。 如果我使用 Union,它将不起作用,因为流不同,并且不允许我进行 union。如果我使用过滤器,我将不会获得我想要的动态行为。 有什么建议吗?
谢谢
最佳答案
使用 Flink,您可以使用 Either 强制对不同类型的流进行联合。这有点 hacky,但似乎也可以与 Apache Edgent 一起使用。
更新:
我刚刚学习Edgent,但它似乎有控制流的概念:https://edgent.apache.org/recipes/recipe_adaptable_filter_range.html .
关于java - 使用其他基本运算符是否可以具有与 CoFlatMapFunction 相同的行为?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53881770/