gpt4 book ai didi

python - 数据流未显示流管道的输出收集计数?

转载 作者:太空宇宙 更新时间:2023-11-03 21:11:44 24 4
gpt4 key购买 nike

我有一个从 Pubsub 读取数据的流媒体管道。我正在使用 apache beam python sdk 2.10。

我的管道包含不同的阶段。当我们使用 ReadFromPubsub 从 pubsub 读取数据时,我可以在第一阶段看到输入和输出集合计数。但是在第二阶段仅显示输入收集计数,输出收集计数为空白。

在最后阶段,我正在向 BigQuery 写信。 enter image description here

enter image description here

enter image description here

最佳答案

Support for streaming pipelines with Apache Beam Python SDK on Google Cloud Dataflow is in Beta .

某些功能未得到完全支持,某些监控指标就是这种情况。随着支持的改善,这些将逐渐添加。

计数器不可用,但您可以使用指标计数器添加自己的计数器,如下所示:

from apache_beam.metrics import Metrics

def debug(msg):
Metrics.counter('elementCounts', 'filePaths').inc()
# The rest of your code....

这有帮助吗?

关于python - 数据流未显示流管道的输出收集计数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55022782/

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