public class ZooKeeperMain extends Object
| Constructor and Description |
|---|
ZooKeeperMain(String[] args) |
ZooKeeperMain(ZooKeeper zk) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
createQuota(ZooKeeper zk,
String path,
long bytes,
int numNodes)
this method creates a quota node for the path
|
static boolean |
delQuota(ZooKeeper zk,
String path,
boolean bytes,
boolean numNodes)
this method deletes quota for a node.
|
void |
executeLine(String line) |
static List<String> |
getCommands() |
boolean |
getPrintWatches() |
static void |
main(String[] args) |
static void |
printMessage(String msg) |
public ZooKeeperMain(String[] args) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic ZooKeeperMain(ZooKeeper zk)
public boolean getPrintWatches()
public static void printMessage(String msg)
public static void main(String[] args) throws KeeperException, IOException, InterruptedException
public void executeLine(String line) throws InterruptedException, IOException, KeeperException
public static boolean delQuota(ZooKeeper zk, String path, boolean bytes, boolean numNodes) throws KeeperException, IOException, 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 unsetKeeperExceptionIOExceptionInterruptedExceptionpublic static boolean createQuota(ZooKeeper zk, String path, long bytes, int numNodes) throws KeeperException, IOException, 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 pathKeeperExceptionIOExceptionInterruptedExceptionCopyright © 2016 The Apache Software Foundation