@InterfaceAudience.Public
public class ZooKeeperMain
extends java.lang.Object
Constructor and Description |
---|
ZooKeeperMain(java.lang.String[] args) |
ZooKeeperMain(ZooKeeper zk) |
Modifier and Type | Method and Description |
---|---|
static boolean |
createQuota(ZooKeeper zk,
java.lang.String path,
long bytes,
int numNodes)
this method creates a quota node for the path
|
static boolean |
delQuota(ZooKeeper zk,
java.lang.String path,
boolean bytes,
boolean numNodes)
this method deletes quota for a node.
|
void |
executeLine(java.lang.String line) |
static java.util.List<java.lang.String> |
getCommands() |
boolean |
getPrintWatches() |
static void |
main(java.lang.String[] args) |
static void |
printMessage(java.lang.String msg) |
public ZooKeeperMain(java.lang.String[] args) throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
public ZooKeeperMain(ZooKeeper zk)
public boolean getPrintWatches()
public static java.util.List<java.lang.String> getCommands()
public static void printMessage(java.lang.String msg)
public static void main(java.lang.String[] args) throws KeeperException, java.io.IOException, java.lang.InterruptedException
KeeperException
java.io.IOException
java.lang.InterruptedException
public void executeLine(java.lang.String line) throws java.lang.InterruptedException, java.io.IOException, KeeperException
java.lang.InterruptedException
java.io.IOException
KeeperException
public static boolean delQuota(ZooKeeper zk, java.lang.String path, boolean bytes, boolean numNodes) throws KeeperException, java.io.IOException, java.lang.InterruptedException
zk
- the zookeeper clientpath
- the path to delete quota forbytes
- true if number of bytes needs to
be unsetnumNodes
- true if number of nodes needs
to be unsetKeeperException
java.io.IOException
java.lang.InterruptedException
public static boolean createQuota(ZooKeeper zk, java.lang.String path, long bytes, int numNodes) throws KeeperException, java.io.IOException, java.lang.InterruptedException
zk
- the ZooKeeper clientpath
- the path for which quota needs to be createdbytes
- the limit of bytes on this pathnumNodes
- the limit of number of nodes on this pathKeeperException
java.io.IOException
java.lang.InterruptedException
Copyright © 2019 The Apache Software Foundation