Apache > ZooKeeper > ZooKeeper
 

ZooKeeper Quota's Guide

A Guide to Deployment and Administration

Quotas

ZooKeeper has both namespace and bytes quotas. You can use the ZooKeeperMain class to setup quotas. ZooKeeper prints WARN messages if users exceed the quota assigned to them. The messages are printed in the log of the ZooKeeper.

$java -cp zookeeper.jar:src/java/lib/log4j-1.2.16.jar:src/java/lib/jline-2.11.jar:conf \ org.apache.zookeeper.ZooKeeperMain -server host:port

The above command gives you a command line option of using quotas.

Setting Quotas

You can use setquota to set a quota on a ZooKeeper node. It has an option of setting quota with -n (for namespace) and -b (for bytes).

The ZooKeeper quota are stored in ZooKeeper itself in /zookeeper/quota. To disable other people from changing the quota's set the ACL for /zookeeper/quota such that only admins are able to read and write to it.

Listing Quotas

You can use listquota to list a quota on a ZooKeeper node.

Deleting Quotas

You can use delquota to delete quota on a ZooKeeper node.