zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Hunt <ph...@apache.org>
Subject Re: how to set zookeeper session time to forever?
Date Wed, 07 Dec 2011 21:23:47 GMT
The client bindings are responsible for maintaining a heartbeat with
the service:
there's nothing you need to do here from your application's
perspective. If the TCP connection is lost btw the client and server
(or any other reason why the client's heartbeats don't get to the
server and back, such as a GC pause on the client side) that's when
the timeout comes into play.


On Wed, Dec 7, 2011 at 1:13 PM, Yuhan Zhang <yzhang@onescreen.com> wrote:
> Hi all,
> I'm using ZooKeeper as an event system that sends notification. This is
> done by creating a zooKeeper
> object, and calling getChildren(). It works fine. However, the session time
> concerns me, as it is an Integer,
> and a session time with Integer.MAX_VALUE in java will timeout in about 25
> days. I have to keep a thread
> to refresh the connection to avoid it.
> Is there a particular reason that a long is not used for the sessionTime?
> or will it cause a problem if zooKeeper
> wait forever?
> Thank you.
> Yuhan

View raw message