-Re: How does leader/follower invoke setupRequestProcessors()?
Mahadev Konar 2011-09-07, 07:40
You can follow the code to see that the startup() method (in
ZooKeeperServer()) is the one that leads to all the setup methods
being called. Take a look at ServerCnxnFactory.start() and you should
be able to follow how its being called.
OTOH, the start up code isnt very clean right now. It needs a little
bit of cleanup to make it more understandable.
hope that helps
2011/8/31 朱君 <[EMAIL PROTECTED]>:
> I am reading the source code of ZooKeeper 3.3.0, and stucked.
> After the instance of LeaderZooKeeperServer (inherit from QuorumZooKeeperServer which inherits from ZooKeeperServer ) has been created (in class QuorumPeer:657), where does it invoke setupRequestProcessors()? In standalone mode, it is easy to find whre setupRequestProcessors is called. But in quorum mode, i don't know how the function is invoked.
> Thanks very much!