I'm trying to make a distributed execution to all members of cluster.
The idea is to get the free disk space on each node.
ExecutorService es = this.hz.getExecutorService();
MultiTask<Boolean> task = new MultiTask<Boolean>(new
MonitorDiskSpaceTask(), this.getMembers());
es.execute(task);
ArrayList<Integer> = task.get();
Let's suppose I send this execution to 4 members. Then, 3 of them
return OK but one of them throws an exception. I should show the
following:
Node1 135 Mb.
Node2 223Mb.
Node3 ---- -> this is the node that failed
Node4 760 Mb.
As Talip says in the documentation, MultiTask.get() will throw
java.util.concurrent.ExecutionException if any of the executions
throws exception. With that in mind, if a member fails I cannot get
any result (even from the nodes where the execution goes well).
is there any way to achieve this?
Thanks,
Joan.