Package org.apache.zookeeper.cli
Class SetQuotaCommand
java.lang.Object
org.apache.zookeeper.cli.CliCommand
org.apache.zookeeper.cli.SetQuotaCommand
setQuota command for cli
-
Field Summary
Fields inherited from class org.apache.zookeeper.cli.CliCommand
err, out, zk
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
createQuota
(ZooKeeper zk, String path, StatsTrack quota) this method creates a quota node for the pathboolean
exec()
parse the command argumentsMethods inherited from class org.apache.zookeeper.cli.CliCommand
addToMap, getCmdStr, getOptionStr, getUsageStr, setErr, setOut, setZk
-
Constructor Details
-
SetQuotaCommand
public SetQuotaCommand()
-
-
Method Details
-
parse
Description copied from class:CliCommand
parse the command arguments- Specified by:
parse
in classCliCommand
- Parameters:
cmdArgs
-- Returns:
- this CliCommand
- Throws:
CliParseException
-
exec
- Specified by:
exec
in classCliCommand
- Returns:
- true if command has watch option, false otherwise
- Throws:
CliException
-
createQuota
public static boolean createQuota(ZooKeeper zk, String path, StatsTrack quota) throws KeeperException, InterruptedException, MalformedPathException this method creates a quota node for the path- Parameters:
zk
- the ZooKeeper clientpath
- the path for which quota needs to be createdquota
- the quotas- Returns:
- true if its successful and false if not.
- Throws:
KeeperException
InterruptedException
MalformedPathException
-