gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 15:05:39 24 4
gpt4 key购买 nike

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

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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com