apache-flink - 命名要在 Flink 执行计划 UI 中显示的运算符、源、接收器和模式

标签 apache-flink flink-streaming flink-cep

我只想给运营商和来源命名。举个例子

enter image description here

这是我从 Flink Dashboard 中截取的执行计划的屏幕截图。在这里,我有 2 个 DataStreams 来源,然后我加入了它们。我的问题是,我可以将这些来源命名为 EcgStreamSp02 Stream 并加入 Join1 吗?

我问这个问题的原因是它使可视化更容易。另外,正如我所说的那样Opsclarity page ,在页面的末尾,他们提到了以下内容

Note the task_name and operator_name have been compressed so we can still distinguish the tasks and operators correctly when latency is aggregated across tasks and operators. But these compressed names will not match what is seen in the Flink UI, which will show a fragment of Scala code as the operator name. If you need these names to be meaningful in the metric system, you should supply names in the Flink code of your application. This compressed value only happens for those very long default names that wouldn’t otherwise be legal metric values.

我还有另一个问题,那就是每当我为 CEP 制作模式时,执行计划 UI 只会将其显示为模式。有什么方法可以显示该模式是什么A B+ C? D 。此外,如果我们有多个模式,我们应该能够将其命名为 Patterns{1..n}

最佳答案

这个问题是通过使用 name() 而不是 uid() 解决的,如下所示

// getting RR interval stream
DataStream<RRIntervalStreamEvent> rrIntervalStreamEventDataStream = envrionment.addSource(new RR_interval_Gen()).name("RR Interval stream");


System.out.println("getting transformation for stream 1 = " + rrIntervalStreamEventDataStream.getTransformation());
// getting QRS interval stream

DataStream<qrsIntervalStreamEvent> qrsIntervalStreamEventDataStream = envrionment.addSource(new Qrs_interval_Gen()).name("qrs Interval stream");

输出图如下所示

enter image description here

关于apache-flink - 命名要在 Flink 执行计划 UI 中显示的运算符、源、接收器和模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46963087/

相关文章:

apache-flink - Apache 弗林克 : How to apply multiple counting window functions?

apache-flink - 何时flink支持模式匹配涉及先前事件的字段?

apache-flink - Apache Flink 资源规划最佳实践

benchmarking - Flink 和 Gelly 无法实现高 CPU 利用率

apache-flink - Apache Flink 如何处理倾斜数据?

generics - 在 clojure 中为泛型类提供类型提示

java - Flink时间窗口和滑动时间窗口有什么区别?

hadoop - 为什么Flink 1.4中的每个处理插槽都使用单独的内核?

java - Flink 按字段 id 对记录进行分组的最佳方式

apache-flink - 在 Flink 中使用计数器获取 numOfRecordsIn