Hi,
I tried that and it "sort of works" in that I can get a map of task
futures. However, what we really want is an ability to drill down and
cancel a a particular job associated with the task. This post says that it
is not possible -
http://apache-ignite-users.70518.x6.nabble.com/Cancel-tasks-on-Ignite-compute-grid-worker-nodes-td5027.html

Our use case is that a task can have many jobs, and sometimes a job might
be in a bad state (hung , running for too long etc etc). We would like the
ability to cancel these jobs .

Thanks


 ClusterGroup clusterGroup = grid.cluster();
            final Map<IgniteUuid, ComputeTaskFuture<Object>>
computeTaskFutures = grid.compute(clusterGroup).activeTaskFutures();

            for (Map.Entry<IgniteUuid, ComputeTaskFuture<Object>> e :
computeTaskFutures.entrySet()) {
                System.out.println("!!!!!!! " + e.getKey() + " : " +
e.getValue().getTaskSession().getAttributes());
            }

On Wed, Nov 9, 2016 at 10:13 AM, Alexey Kuznetsov <akuznet...@apache.org>
wrote:

> Hi Vinay,
>
> I think IgniteCompute.activeTaskFutures() will give you map of active
> tasks.
> And you may iterate over that map and cancel that tasks.
> But you should do it on all nodes with tasks, because in javadoc I see
> "Gets tasks future for active tasks started on local node."
>
> /**
>  * Gets tasks future for active tasks started on local node.
>  *
>  * @return Map of active tasks keyed by their task task session ID.
>  */
> public <R> Map<IgniteUuid, ComputeTaskFuture<R>> activeTaskFutures();
>
>
> Hope this help.
>
> On Wed, Nov 9, 2016 at 11:02 PM, Vinay B, <vybe3...@gmail.com> wrote:
>
>> Could someone point me to the applicable API that can return  a list of
>> executing jobs on an ignite node?
>>
>> Additionally, given a list of executing jobs, I would like to be able to
>> cancel selected jobs. What is the API I should be looking at?
>>
>>
>> Thanks in advance
>>
>>
>>
>
>
> --
> Alexey Kuznetsov
>

Reply via email to