Hi all,
I am trying to do some tests to see how long it takes for Zookeeper to write 
various sizes of data on each znode. I am using PHP-API from 
https://github.com/andreiz/php-zookeeper. I have 2 questions:
1. How do I write 4000 bytes - 1MB of data on each znode? My php client starts 
acting up beyond 4000 bytes and I am not able to edit the client. I am using 
VIM on Xubuntu VM 32 bit.
2. I have a 3 node (N1, N2 (leader), N3) cluster set-up. When I perform a 
single write on N1 I see weird timings on the zookeeper log files.
Let's say I do a write to N1 which is a follower. I get the following result on 
the N1 and N2's log files:
N1----------------

2014-05-07 10:51:01,732 [myid:1] - DEBUG 
[QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:CommitProcessor@161] - Committing 
request:: sessionid:0x145be8a7f4b0041 type:create cxid:0x536a4857 
zxid:0x100000196 txntype:1 reqpath:n/a
2014-05-07 10:51:01,733 [myid:1] - DEBUG 
[CommitProcessor:1:FinalRequestProcessor@88] - Processing request:: 
sessionid:0x145be8a7f4b0041 type:create cxid:0x536a4857 zxid:0x100000196 
txntype:1 reqpath:/test--10
2014-05-07 10:51:01,734 [myid:1] - DEBUG 
[CommitProcessor:1:FinalRequestProcessor@160] - sessionid:0x145be8a7f4b0041 
type:create cxid:0x536a4857 zxid:0x100000196 txntype:1 reqpath:/test--10

N2----------------

2014-05-07 10:51:01,705 [myid:2] - DEBUG [ProcessThread(sid:2 
cport:-1)::CommitProcessor@171] - Processing request:: 
sessionid:0x145be8a7f4b0041 type:create cxid:0x536a4857 zxid:0x100000196 
txntype:1 reqpath:n/a
2014-05-07 10:51:01,705 [myid:2] - DEBUG [ProcessThread(sid:2 
cport:-1)::Leader@768] - Proposing:: sessionid:0x145be8a7f4b0041 type:create 
cxid:0x536a4857 zxid:0x100000196 txntype:1 reqpath:n/a
2014-05-07 10:51:01,740 [myid:2] - DEBUG 
[LearnerHandler-/10.22.70.20:47250:CommitProcessor@161] - Committing request:: 
sessionid:0x145be8a7f4b0041 type:create cxid:0x536a4857 zxid:0x100000196 
txntype:1 reqpath:n/a
2014-05-07 10:51:01,741 [myid:2] - DEBUG 
[CommitProcessor:2:FinalRequestProcessor@88] - Processing request:: 
sessionid:0x145be8a7f4b0041 type:create cxid:0x536a4857 zxid:0x100000196 
txntype:1 reqpath:n/a

How is the operation first logged in N2 before logging in N1? This does not 
happen all the time, the order of logging for a single operation is always 
different during various write operations. Anyone knows why this could be 
happening? My question regarding the timing is only for logging. I know all the 
operations in zookeeper are ordered so do not confuse it with that. Also, the 
timings on my zookeeper servers are synchronized.

Let me know if you need any more information!

Many thanks,
Ganesh


Reply via email to