Query a client node connection status


(tomer doron) #1

is there some event that node/client dispatches when it connects/
disconnects from the cluster? i am trying to find a a way to manage
node's connection status, perhaps there a different methodology of
achieving this?


(Shay Banon) #2

There isn't a callback API for that on the client API level. You can try and
call cluster health / state, if it returns, it means you are connected.

On Sun, Nov 7, 2010 at 3:55 AM, tomer doron tomer.doron@gmail.com wrote:

is there some event that node/client dispatches when it connects/
disconnects from the cluster? i am trying to find a a way to manage
node's connection status, perhaps there a different methodology of
achieving this?


(tomer doron) #3

thanks shay, this is what i ended up doing (on a scheduler). however,
i do think a callback/event for connection status changes would be
nice addition. do you want me to open an enhancement ticket?

On Nov 8, 1:44 pm, Shay Banon shay.ba...@elasticsearch.com wrote:

There isn't a callback API for that on the client API level. You can try and
call cluster health / state, if it returns, it means you are connected.

On Sun, Nov 7, 2010 at 3:55 AM, tomer doron tomer.do...@gmail.com wrote:

is there some event that node/client dispatches when it connects/
disconnects from the cluster? i am trying to find a a way to manage
node's connection status, perhaps there a different methodology of
achieving this?


(Shay Banon) #4

Yea, sounds like a good idea!

On Tue, Nov 16, 2010 at 5:37 AM, tomer doron tomer.doron@gmail.com wrote:

thanks shay, this is what i ended up doing (on a scheduler). however,
i do think a callback/event for connection status changes would be
nice addition. do you want me to open an enhancement ticket?

On Nov 8, 1:44 pm, Shay Banon shay.ba...@elasticsearch.com wrote:

There isn't a callback API for that on the client API level. You can try
and
call cluster health / state, if it returns, it means you are connected.

On Sun, Nov 7, 2010 at 3:55 AM, tomer doron tomer.do...@gmail.com
wrote:

is there some event that node/client dispatches when it connects/
disconnects from the cluster? i am trying to find a a way to manage
node's connection status, perhaps there a different methodology of
achieving this?


(system) #5