hadoop-zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From YeQian....@gmail.com
Subject How to reconnect server when the session expired?
Date Tue, 29 Sep 2009 07:23:25 GMT
Hi all:

When used Zookeeper in my project, I noticed a problem about the session.  
When a session expired, the io thread of the client just return,
void *do_io(void *v)
while(!zh->close_requested) {

However, in my scenario, I want to reconnect to the Zookeeper Server and  
recover the watcher which have been set for the last session. How to do it?  
Just close the last zookeeper handler and init a new one, and add all the  
watchers again? Is there a more efficient way?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message