Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Apache ZooKeeper Essentials

You're reading from   Apache ZooKeeper Essentials A fast-paced guide to using Apache ZooKeeper to coordinate services in distributed systems

Arrow left icon
Product type Paperback
Published in Jan 2015
Publisher
ISBN-13 9781784391324
Length 168 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Saurav Haloi Saurav Haloi
Author Profile Icon Saurav Haloi
Saurav Haloi
Arrow right icon
View More author details
Toc

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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at R$50/month. Cancel anytime