You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Sergey Doroshenko <do...@gmail.com> on 2011/02/16 16:18:33 UTC

ZooKeeper Read-Only Mode

If you're interested in trying out ZooKeeper Read-Only Mode [1], you are
welcome to
checkout updated ZooKeeper version from https://github.com/dorserg/zookeeper
.

It's basically a fork of ZooKeeper with patches related to read-only mode
(namely,
ZOOKEEPER-784, -827 and -830) applied.

The easiest way to get your hands dirty is to invoke bin/zkCli.sh with "-r"
parameter.
For example:
1. Launch ZooKeeper cluster consisting of 3 local instances at ports 2181,
2182 and 2183.
2. Invoke client with "./bin/zkCli.sh -server :2181,:2182,:2183 -r" command.
3. Ensure that the client can perform read and write operations.
4. Shut down 2 of 3 server instances. Observe how the client switches to
read-only mode.
5. Ensure that the client can perform read operations; write operations fail
with error message.

While the patches are being reviewed, the above repo provides all the code
in
one place, ready to use. So if you're interested, please try it out.
Feedback is welcome.

[1]
Wiki page: http://wiki.apache.org/hadoop/ZooKeeper/GSoCReadOnlyMode
Umbrella ticket: https://issues.apache.org/jira/browse/ZOOKEEPER-704

-- 
Best regards,
Sergey Doroshenko: http://dorserg.com