Couple of questions to Igniters (cross-posting to dev list).

1. Why IgniteCompute does not return ComputeTaskFuture from all methods?

2. In GridGain 6.x and earlier there was a method
GridComputeImpl#cancelTask(GridUuid sesId) -
https://github.com/gridgain/gridgain/blob/cf56a35cbae442d11181f58004505d6b00fc2f59/modules/core/src/main/java/org/gridgain/grid/kernal/GridComputeImpl.java,
but I cannot find it in Ignite. Who does know anything on this?

Vadim, it seems that you have 2 options now:
1. You can get future from IgniteCompute#broadcastAsync() and call
Future#cancel() - this works if you do not restart client and cancel your
task from its master node.
2. If you want to restart client node and then somehow manage the spawned
tasks (broadcast() is still a task deep inside Ignite) then first of all
you need to implement org.apache.ignite.compute.ComputeJobMasterLeaveAware
on your Runnables so they do not get automatically cancelled on master
leave. Second, I think you will have to use distributed cache and put some
job related data to it and periodically poll that cache for changes from
your jobs and support job's automatic exit if its data changes accordingly.
Then you can iterate over cache entry set and cancel jobs you want by
changing their data.

--Yakov

Reply via email to