hadoop-zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gustavo Niemeyer <gust...@niemeyer.net>
Subject Re: How to reestablish a session
Date Fri, 19 Nov 2010 00:12:02 GMT
> why don't you let the client library do the move for you?

Maybe there's no need to reestablish the session manually, but there
are a few details in the API which give a hint this should be
supported.  The strongest one is that there's a parameter in
zookeeper_init() to allow reestablishing an existing session.  Without
the ability to close a previous connection reliably without killing
the existing session, how can we use this parameter and the function
to retrieve the existing client id?  Another hint is in
is_unrecoverable(), which says the application must close the zhandle
and try to reconnect in case it returns true.  Maybe I misinterpreted
it, and it actually means the *session* is dead, rather than just the
connection?

-- 
Gustavo Niemeyer
http://niemeyer.net
http://niemeyer.net/blog
http://niemeyer.net/twitter

Mime
View raw message