Hi Val,

I tried doing *future.cancel()* and *compute().undeployTask("foo")*, check
[1]. Are they equivalent in this case?

*Thread.interrupted()* is always false, so I'm guessing that's not the
correct flag I should be checking.

[1] https://gist.github.com/anonymous/0a8759e70eddab470f09dcb92644f3c7

Thanks,
Matt


On Mon, Jul 17, 2017 at 2:26 PM, vkulichenko <valentin.kuliche...@gmail.com>
wrote:

> Hi Matt,
>
> 1. Each task or closure execution creates a session that has an ID. You can
> cast returned IgniteFuture to ComputeTaskFuture (unfortunately there is no
> other way now) and then use getTaskSession() method to get the session
> description. However, this information is available only on the node that
> executed the job, there is currently no way to cancel it from other client.
>
> 2. When job is cancelled, thread that is running it is interrupted. Job
> should check the interrupted flag and stop the execution if needed.
>
> 3. See #1. Having session ID, you can get a future for a task and then
> cancel it. But again, it's all local - this state is not shared across
> nodes.
>
> -Val
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Compute-Grid-Questions-tp14980p15015.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Reply via email to