River module stops after nodes shutdown

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

River module stops after nodes shutdown

Marek Skorek
Hi, I have created an elasticsearch river module and I have a question
about its lifecycle.

I met a situation where cluster nodes were shut down before sending
shutdown signal to es-plugin.
Is there any possibility to make my plugin more aware about cluster
state and stop it before nodes will shut down?

If the nodes shut down earlier that my plugin it will throw exceptions
(nodes shutdown) during indexing. In that case nothing bad happens
because data will be indexed next time, but system logs doesn't look
well then ;-)

Thanks for any helpful advice :-)
Reply | Threaded
Open this post in threaded view
|

Re: River module stops after nodes shutdown

kimchy
Administrator
The close operation on the river will be called when a node shuts down. Are you saying you don't see it being called?

On Mon, Sep 12, 2011 at 12:21 PM, scoro <[hidden email]> wrote:
Hi, I have created an elasticsearch river module and I have a question
about its lifecycle.

I met a situation where cluster nodes were shut down before sending
shutdown signal to es-plugin.
Is there any possibility to make my plugin more aware about cluster
state and stop it before nodes will shut down?

If the nodes shut down earlier that my plugin it will throw exceptions
(nodes shutdown) during indexing. In that case nothing bad happens
because data will be indexed next time, but system logs doesn't look
well then ;-)

Thanks for any helpful advice :-)

Reply | Threaded
Open this post in threaded view
|

Re: River module stops after nodes shutdown

Marek Skorek
Hey Shay,

I see it being called. I just mean I can't index documents in the
interval between shards shutdown and closing river plugin.
I made a mistake and wrote "nodes" instead of "shards" :)

On 12 Wrz, 11:23, Shay Banon <[hidden email]> wrote:

> The close operation on the river will be called when a node shuts down. Are
> you saying you don't see it being called?
>
>
>
>
>
>
>
> On Mon, Sep 12, 2011 at 12:21 PM, scoro <[hidden email]> wrote:
> > Hi, I have created an elasticsearch river module and I have a question
> > about its lifecycle.
>
> > I met a situation where cluster nodes were shut down before sending
> > shutdown signal to es-plugin.
> > Is there any possibility to make my plugin more aware about cluster
> > state and stop it before nodes will shut down?
>
> > If the nodes shut down earlier that my plugin it will throw exceptions
> > (nodes shutdown) during indexing. In that case nothing bad happens
> > because data will be indexed next time, but system logs doesn't look
> > well then ;-)
>
> > Thanks for any helpful advice :-)
Reply | Threaded
Open this post in threaded view
|

Re: River module stops after nodes shutdown

kimchy
Administrator
Ahh, yes, you can't index docs when it happens because the rivers will be closed after other services are closed / stopped. It might make sense to move this and close the rivers first, allowing one to still operate while being closed, opened an issue: https://github.com/elasticsearch/elasticsearch/issues/1330.

On Mon, Sep 12, 2011 at 9:17 PM, scoro <[hidden email]> wrote:
Hey Shay,

I see it being called. I just mean I can't index documents in the
interval between shards shutdown and closing river plugin.
I made a mistake and wrote "nodes" instead of "shards" :)

On 12 Wrz, 11:23, Shay Banon <[hidden email]> wrote:
> The close operation on the river will be called when a node shuts down. Are
> you saying you don't see it being called?
>
>
>
>
>
>
>
> On Mon, Sep 12, 2011 at 12:21 PM, scoro <[hidden email]> wrote:
> > Hi, I have created an elasticsearch river module and I have a question
> > about its lifecycle.
>
> > I met a situation where cluster nodes were shut down before sending
> > shutdown signal to es-plugin.
> > Is there any possibility to make my plugin more aware about cluster
> > state and stop it before nodes will shut down?
>
> > If the nodes shut down earlier that my plugin it will throw exceptions
> > (nodes shutdown) during indexing. In that case nothing bad happens
> > because data will be indexed next time, but system logs doesn't look
> > well then ;-)
>
> > Thanks for any helpful advice :-)

Reply | Threaded
Open this post in threaded view
|

Re: River module stops after nodes shutdown

Marek Skorek
Thank you Shay ;-)

I guess that should help and I will not be concerned about checking
for ability to index my documents after STOP signal :-)

On 13 Wrz, 01:00, Shay Banon <[hidden email]> wrote:

> Ahh, yes, you can't index docs when it happens because the rivers will be
> closed after other services are closed / stopped. It might make sense to
> move this and close the rivers first, allowing one to still operate while
> being closed, opened an issue:https://github.com/elasticsearch/elasticsearch/issues/1330.On Mon, Sep 12, 2011 at 9:17 PM, scoro <[hidden email]> wrote:
> > Hey Shay,
>
> > I see it being called. I just mean I can't index documents in the
> > interval between shards shutdown and closing river plugin.
> > I made a mistake and wrote "nodes" instead of "shards" :)
>
> > On 12 Wrz, 11:23, Shay Banon <[hidden email]> wrote:
> > > The close operation on the river will be called when a node shuts down.
> > Are
> > > you saying you don't see it being called?
>
> > > On Mon, Sep 12, 2011 at 12:21 PM, scoro <[hidden email]> wrote:
> > > > Hi, I have created an elasticsearch river module and I have a question
> > > > about its lifecycle.
>
> > > > I met a situation where cluster nodes were shut down before sending
> > > > shutdown signal to es-plugin.
> > > > Is there any possibility to make my plugin more aware about cluster
> > > > state and stop it before nodes will shut down?
>
> > > > If the nodes shut down earlier that my plugin it will throw exceptions
> > > > (nodes shutdown) during indexing. In that case nothing bad happens
> > > > because data will be indexed next time, but system logs doesn't look
> > > > well then ;-)
>
> > > > Thanks for any helpful advice :-)