列出当前的Ignite作业并取消它们 [英] Listing current Ignite jobs and cancelling them

查看:71
本文介绍了列出当前的Ignite作业并取消它们的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里得到了部分答案,但并不是我想要的.

I got a partial answer here but not exactly what I wanted.

该链接描述了如何获取任务期货的列表,但是我真正想做的是列出并取消单个作业(可能挂起,长时间运行等).我看到另一则帖子暗示这是不可能的,但我想确认(请参阅第二个链接)

The link describes how to get a list of task futures but what I'd really like to be able to do is list out and cancel individual jobs (that might be hung, long running etc etc). I've seen another post implying that this is not possible but I'd like to confirm (see second link)

谢谢

  1. http://apache-ignite-users.70518.x6.nabble.com/Cancel-tasks-on-Ignite-compute-grid-worker-nodes-td5027.html

    推荐答案

    是的,这是不可能的,实际上我不确定在一般情况下如何做到这一点.想象有5个作业正在运行,而您想取消其中一个.您将如何识别它?这似乎是我特有的用例.

    Yes, this is not possible and actually I'm not sure how this can be done in general case. Imagine there are 5 jobs running and you want to cancel one of them. How are you going to identify it? It seems to be very use case specific to me.

    但是,您始终可以实现自己的机制来执行此操作.一种可能的方法是使用 ComputeTaskSession API和任务属性.例如,设置一个特殊的属性以充当取消作业的信号,并创建属性侦听器以相应地停止执行作业.

    However, you can always implement your own mechanism to do this. One of the possible ways is to use ComputeTaskSession API and task attributes. E.g., set a special attribute that will act as signal for job cancellation and create attribute listener that will stop job execution accordingly.

    这篇关于列出当前的Ignite作业并取消它们的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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