org.apache.zookeeper
Class ZooKeeperMain
java.lang.Object
  
org.apache.zookeeper.ZooKeeperMain
public class ZooKeeperMain
- extends Object
 
The command line client to ZooKeeper.
 
 
 
ZooKeeperMain
public ZooKeeperMain(String[] args)
              throws IOException,
                     InterruptedException
- Throws:
 IOException
InterruptedException
ZooKeeperMain
public ZooKeeperMain(ZooKeeper zk)
getPrintWatches
public boolean getPrintWatches()
 
getCommands
public static List<String> getCommands()
 
printMessage
public static void printMessage(String msg)
 
main
public static void main(String[] args)
                 throws KeeperException,
                        IOException,
                        InterruptedException
- Throws:
 KeeperException
IOException
InterruptedException
 
executeLine
public void executeLine(String line)
                 throws InterruptedException,
                        IOException,
                        KeeperException
- Throws:
 InterruptedException
IOException
KeeperException
 
delQuota
public static boolean delQuota(ZooKeeper zk,
                               String path,
                               boolean bytes,
                               boolean numNodes)
                        throws KeeperException,
                               IOException,
                               InterruptedException
- this method deletes quota for a node.
- Parameters:
 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 unset
- Returns:
 - true if quota deletion is successful
 - Throws:
 KeeperException
IOException
InterruptedException
 
 
createQuota
public static boolean createQuota(ZooKeeper zk,
                                  String path,
                                  long bytes,
                                  int numNodes)
                           throws KeeperException,
                                  IOException,
                                  InterruptedException
- this method creates a quota node for the path
- Parameters:
 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 path
- Returns:
 - true if its successful and false if not.
 - Throws:
 KeeperException
IOException
InterruptedException
 
 
Copyright © 2010 The Apache Software Foundation