使用其他基本运算符是否可能具有CoFlatMapFunction相同的行为? [英] Is that possible to have the same behavior of CoFlatMapFunction using other basic operators?

查看:64
本文介绍了使用其他基本运算符是否可能具有CoFlatMapFunction相同的行为?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基本上,我正在使用CoFlatMapFunction( https://edgent.incubator.apache.org/javadoc/latest/org/apache/edgent/topology/TStream.html ),但它没有CoFlatMapFunction. 如果我使用联盟,则将无法正常工作,因为流是不同的,并且不允许进行联盟.如果使用筛选器",我将没有想要的动态行为. 有什么建议吗?

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?

谢谢

推荐答案

使用Flink,您可以通过使用Either在不同类型的流上强制执行Union.这有点骇人听闻,但似乎它也可以与Apache Edgent一起使用.

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.

已更新:

我只是在学习Edgent,但似乎有控制流的概念: https://edgent.apache.org/recipes/recipe_adaptable_filter_range.html .

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.

这篇关于使用其他基本运算符是否可能具有CoFlatMapFunction相同的行为?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆