Ignite Shutdown Hook

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Ignite Shutdown Hook

hemanta
Hi,

I am starting Ignite as standalone program embedded in my java application via Spring configuration. It works great however my application stucks and never finishes. I have added some shutdown hooks but they are never called. I think this is because Ignite is running in main thread and stopping jvm to exit.

I want jvm to stop Ignite and exit gracefully but this is not what I am seeing. Any suggestions? Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: Ignite Shutdown Hook

dsetrakyan
+ user list

On Tue, Dec 20, 2016 at 12:30 PM, hemanta <[hidden email]> wrote:

> Hi,
>
> I am starting Ignite as standalone program embedded in my java application
> via Spring configuration. It works great however my application stucks and
> never finishes. I have added some shutdown hooks but they are never called.
> I think this is because Ignite is running in main thread and stopping jvm
> to
> exit.
>
> I want jvm to stop Ignite and exit gracefully but this is not what I am
> seeing. Any suggestions? Thank you.
>
>
>
> --
> View this message in context: http://apache-ignite-
> developers.2346864.n4.nabble.com/Ignite-Shutdown-Hook-tp13198.html
> Sent from the Apache Ignite Developers mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Ignite Shutdown Hook

Valentin Kulichenko
In reply to this post by hemanta
Hi,

I'm not sure I understand the problem... Where is the application stuck?
Did you look at thread dump?

-Val

On Tue, Dec 20, 2016 at 12:30 PM, hemanta <[hidden email]> wrote:

> Hi,
>
> I am starting Ignite as standalone program embedded in my java application
> via Spring configuration. It works great however my application stucks and
> never finishes. I have added some shutdown hooks but they are never called.
> I think this is because Ignite is running in main thread and stopping jvm
> to
> exit.
>
> I want jvm to stop Ignite and exit gracefully but this is not what I am
> seeing. Any suggestions? Thank you.
>
>
>
> --
> View this message in context: http://apache-ignite-
> developers.2346864.n4.nabble.com/Ignite-Shutdown-Hook-tp13198.html
> Sent from the Apache Ignite Developers mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Ignite Shutdown Hook

hemanta
Thank you for your reply. It is stuck at Ignite.
If in last line of public static void main() I add code to stop Ignite then everything works fine. But I have so many stand alone classes (public static void main) that run as a part of upgrade that I can not add Ignition.stop() in all of them. So, I was looking at option of shutdown hook which is not working with Ignite.

I see lots of IgniteThread in threaddump.
Reply | Threaded
Open this post in threaded view
|

Re: Ignite Shutdown Hook

dmagda
Please share the thread dumps with us.


Denis

> On Dec 21, 2016, at 6:35 AM, hemanta <[hidden email]> wrote:
>
> Thank you for your reply. It is stuck at Ignite.
> If in last line of public static void main() I add code to stop Ignite then
> everything works fine. But I have so many stand alone classes (public static
> void main) that run as a part of upgrade that I can not add Ignition.stop()
> in all of them. So, I was looking at option of shutdown hook which is not
> working with Ignite.
>
> I see lots of IgniteThread in threaddump.
>
>
>
> --
> View this message in context: http://apache-ignite-developers.2346864.n4.nabble.com/Ignite-Shutdown-Hook-tp13198p13239.html
> Sent from the Apache Ignite Developers mailing list archive at Nabble.com.