有没有办法强制数据流工作长时间运行后停止

发布于 2025-02-07 03:18:16 字数 48 浏览 4 评论 0原文

是否有一种方法可以强迫数据流工作,如果运行时间比XXX小时更长? 亲切的问候 马可

is there a way to force a DAtaflow job to kill itself if it is running longer than xxx hours?
Kind regards
Marco

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

初见 2025-02-14 03:18:16

将评论作为答案。

我们正在为批处理管道实施此操作。它尚未作为数据流标志可用,但会在一个月内。

Posting the comment as an answer.

We are in the process of implementing this for Batch Pipelines. It is not yet available as a Dataflow flag, but it will be within a month.

笑梦风尘 2025-02-14 03:18:16

我们最近为数据流实施了此功能。您可以通过额外的实验来做到这一点:

--experiments=max_workflow_runtime_walltime_seconds=300

或任何秒数。


从编程上讲,这就是这样:

String experimentValue = String.format(
    "max_workflow_runtime_walltime_seconds=%d",
    killAfterSeconds);
ExperimentalOptions.addExperiment(myOptions.as(ExperimentalOptions.class), experimentValue);

在Python中:

experiment_value = "max_workflow_runtime_walltime_seconds=%d" % timeout_secs
my_options.view_as(DebugOptions).add_experiment(experiment_value)

We recently implemented this feature for Dataflow. You would do it by passing an extra experiment:

--experiments=max_workflow_runtime_walltime_seconds=300

Or whatever number of seconds.


Programatically this would be like so:

String experimentValue = String.format(
    "max_workflow_runtime_walltime_seconds=%d",
    killAfterSeconds);
ExperimentalOptions.addExperiment(myOptions.as(ExperimentalOptions.class), experimentValue);

In Python:

experiment_value = "max_workflow_runtime_walltime_seconds=%d" % timeout_secs
my_options.view_as(DebugOptions).add_experiment(experiment_value)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文