Re: Can we put a timeout on Ignite.close ?

2018-12-28 Thread userx
Thank you.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Can we put a timeout on Ignite.close ?

2018-12-28 Thread Denis Mekhanikov
Ignite.close() effectively does exactly what you described.
It tries to stop all threads as fast as possible by interrupting them.
But some threads may be doing some blocking operations at the moment,
so they are not killed instantaneously.
For example, if you try to stop a node in the middle of a checkpoint, then
the close() method may hang until a disk write operation finishes.

You can take a thread dump and analyze it to figure out, what's blocking
the close. Logs also may contain useful information on this matter.

If you need to stop Ignite asynchronously, you can start a new thread
and call Ignite#close() from it.

Denis

ср, 26 дек. 2018 г. в 16:55, userx :

> Hi
>
> Is there a way we can put a timeout on close operation of Ignite. For an
> example I have a java program which does some computation and then starts
> the Ignite in client mode so that the computed numbers can be written to
> cache on Ignite Servers in persistent mode. Say if there is an execution
> exception, I would want the java program to call close on the Ignite
> started
> in the client mode and return to its normal processing with in a specified
> time say 5 seconds or so ?
> Which means that if the ignite in the client mode is not getting closed in
> 5
> seconds, all the ignite threads started on the client side should be
> interrupted and should be closed/killed/stopped.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Can we put a timeout on Ignite.close ?

2018-12-26 Thread userx
Hi

Is there a way we can put a timeout on close operation of Ignite. For an
example I have a java program which does some computation and then starts
the Ignite in client mode so that the computed numbers can be written to
cache on Ignite Servers in persistent mode. Say if there is an execution
exception, I would want the java program to call close on the Ignite started
in the client mode and return to its normal processing with in a specified
time say 5 seconds or so ?
Which means that if the ignite in the client mode is not getting closed in 5
seconds, all the ignite threads started on the client side should be
interrupted and should be closed/killed/stopped.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/