Book Image

Apache ZooKeeper Essentials

By : Saurav Haloi
Book Image

Apache ZooKeeper Essentials

By: Saurav Haloi

Overview of this book

Table of Contents (14 chapters)
Apache ZooKeeper Essentials
About the Author
About the Reviewers
Performing Common Distributed System Tasks

Quota and authorization

ZooKeeper has configurable quotas associated with its data model. It's possible to set the quota limit on the znodes and the data amount of data stored. If a subtree in the ZooKeeper namespace crosses the quota associated with it, ZooKeeper prints warning messages in the log. However, the operation is never cancelled if the quota assigned is exceeded.

ZooKeeper quotas are stored in the ZooKeeper tree in the /zookeeper/quota path. It is possible to set, list, and delete quotas from the ZooKeeper client APIs and through the ZooKeeper Java shell. The following screenshot shows the results of using the set, list, and del commands:

In the preceding example, we created a new znode called /quota_example and set a quota of two child znodes. We then did a listing of the assigned quota and also saw how to delete the assigned quota.

When we created the third child under /quota_example, the following log message is printed as a warning in the ZooKeeper logfile, informing us that...