Class Quotas
java.lang.Object
org.apache.zookeeper.Quotas
this class manages quotas
and has many other utils
for quota
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringthe limit node that has the limit of a subtreestatic final Stringthe zookeeper nodes that acts as the management and status nodestatic final Stringthe zookeeper quota node that acts as the quota management node for zookeeperstatic final Stringthe stat node that monitors the limit of a subtree. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringreturn the limit quota path associated with this prefixstatic Stringreturn the quota path associated with this prefixstatic Stringreturn the stat quota path associated with this prefix.static StringtrimQuotaPath(String quotaPath) return the real path associated with this quotaPath.
-
Field Details
-
procZookeeper
the zookeeper nodes that acts as the management and status node- See Also:
-
quotaZookeeper
the zookeeper quota node that acts as the quota management node for zookeeper- See Also:
-
limitNode
-
statNode
-
-
Constructor Details
-
Quotas
public Quotas()
-
-
Method Details
-
quotaPath
-
limitPath
-
statPath
-
trimQuotaPath
return the real path associated with this quotaPath.- Parameters:
quotaPath- the quotaPath which's started with /zookeeper/quota- Returns:
- the real path associated with this quotaPath, or an empty string
if the given path is not actually under /zookeeper/quota. Returning
"" rather than throwing keeps a stray
zookeeper_limitsnode elsewhere under /zookeeper (or the /zookeeper/quota root itself) from raising StringIndexOutOfBoundsException on the transaction-apply path, which would kill the SyncRequestProcessor critical thread and leave the dataDir unbootable on replay.
-