| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Copyright 2002-2004 The Apache Software Foundation Licensed under the |
| Apache License, Version 2.0 (the "License"); you may not use this file |
| except in compliance with the License. You may obtain a copy of the |
| License at http://www.apache.org/licenses/LICENSE-2.0 Unless required |
| by applicable law or agreed to in writing, software distributed under |
| the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR |
| CONDITIONS OF ANY KIND, either express or implied. See the License for |
| the specific language governing permissions and limitations under the |
| License. |
| --> |
| <!DOCTYPE article PUBLIC "-//OASIS//DTD Simplified DocBook XML V1.0//EN" |
| "http://www.oasis-open.org/docbook/xml/simple/1.0/sdocbook.dtd"> |
| <article id="bk_Quota"> |
| <title>ZooKeeper Quota's Guide</title> |
| <subtitle>A Guide to Deployment and Administration</subtitle> |
| <articleinfo> |
| <legalnotice> |
| <para> |
| Licensed under the Apache License, Version 2.0 (the "License"); you |
| may not use this file except in compliance with the License. You may |
| obtain a copy of the License at |
| <ulink url="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0 |
| </ulink> |
| . |
| </para> |
| <para>Unless required by applicable law or agreed to in |
| writing, software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either |
| express or implied. See the License for the specific language |
| governing permissions and limitations under the License.</para> |
| </legalnotice> |
| <abstract> |
| <para>This document contains information about deploying, |
| administering and mantaining ZooKeeper. It also discusses best |
| practices and common problems.</para> |
| </abstract> |
| </articleinfo> |
| <section id="zookeeper_quotas"> |
| <title>Quotas</title> |
| <para> ZooKeeper has both namespace and bytes quotas. You can use the ZooKeeperMain class to setup quotas. |
| ZooKeeper prints <emphasis>WARN</emphasis> messages if users exceed the quota assigned to them. The messages |
| are printed in the log of the ZooKeeper. |
| </para> |
| <para><computeroutput>$ bin/zkCli.sh -server host:port</computeroutput></para> |
| <para> The above command gives you a command line option of using quotas.</para> |
| <section> |
| <title>Setting Quotas</title> |
| <para>You can use |
| <emphasis>setquota</emphasis> to set a quota on a ZooKeeper node. It has an option of setting quota with |
| -n (for namespace) |
| and -b (for bytes). </para> |
| <para> 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. |
| </para> |
| </section> |
| <section> |
| <title>Listing Quotas</title> |
| <para> You can use |
| <emphasis>listquota</emphasis> to list a quota on a ZooKeeper node. |
| </para> |
| </section> |
| <section> |
| <title> Deleting Quotas</title> |
| <para> You can use |
| <emphasis>delquota</emphasis> to delete quota on a ZooKeeper node. |
| </para> |
| </section> |
| </section> |
| </article> |