the event thread is the client's own thread. zookeeper queues events to the 
event thread so that it doesn't have to worry about a backlog.

even if an application is slow in processing callbacks from the event thread, 
the rest of zookeeper (the heartbeats, the synchronous calls, etc.) will not be 
adversely affected.

ben

________________________________________
From: burtona...@gmail.com [burtona...@gmail.com] On Behalf Of Kevin Burton 
[bur...@spinn3r.com]
Sent: Sunday, January 04, 2009 12:23 PM
To: zookeeper-user@hadoop.apache.org
Subject: Not performing work in the zookeeper even thread.

It looks like events from Zookeeper are dispatches from its event thread:
java.lang.Exception
        at foo.zookeeper.WatcherImpl.process(NodeWatcher.java:54)
        at
org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:349)

... it seems like a good idea to have implementations perform work in their
own thread to avoid zookeeper from hitting backlog if one client decides to
perform some complex operation in one event when there are hundreds of
events pending delivery.

Kevin

--
Founder/CEO Spinn3r.com
Location: San Francisco, CA
AIM/YIM: sfburtonator
Skype: burtonator
Work: http://spinn3r.com

Reply via email to