Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Zookeeper >> mail # user >> Zookeeper protocol weirdness and pure Python kazoo client


+
Ben Bangert 2012-08-30, 23:00
+
Ben Bangert 2012-08-30, 23:02
Copy link to this message
-
Re: Zookeeper protocol weirdness and pure Python kazoo client
Hi Ben,

> Based on the pookeeper code (https://github.com/maguro/pookeeper), I've implemented a version of kazoo that uses the wire protocol and is pure Python (https://github.com/python-zk/kazoo/tree/pure-python). Speaking to Zookeeper directly has been quite interesting. All the documentation assumes one uses the C/Java libs, so what actually happens doesn't seem to be cleanly or clearly defined anywhere beyond the implementations. Is there an actual spec somewhere?

I don't think there is an official spec beyond the zookeeper.jute
file. It would be very helpful if you can share what you have found
implementing your python client.

> One of the oddities of passing a bad auth packet (ie, saying 'asdfjasdf' instead of 'digest'), is that Zookeeper returns an auth packet -4 with an error header, and then drops the connections. In the state diagram, the client is expected to 'end'. That's fine and all, my client happened to reconnect the first time with the prior session id/password.... which was still valid. Is this expected behavior?

I think this is expected. ZooKeeper should not expire a session
because of authentication failure. That would make it easier for a
malicious client to expire random sessions. I don't know if there is a
technical reason for dropping the connection though. Maybe it was an
arbitrary decision?

--Michi
+
Ben Bangert 2012-08-31, 00:06
+
Henry Robinson 2012-08-31, 00:10
+
Ben Bangert 2012-08-31, 04:00
+
Ben Bangert 2012-08-31, 05:04
+
Henry Robinson 2012-08-31, 06:57
+
Ben Bangert 2012-08-31, 16:39
+
Michi Mutsuzaki 2012-08-31, 21:30
+
Ted Dunning 2012-08-31, 20:02
+
Ben Bangert 2012-08-30, 23:35
+
Michi Mutsuzaki 2012-08-30, 23:37
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB