org.apache.zookeeper
Class ZooKeeperMain

java.lang.Object
  extended by org.apache.zookeeper.ZooKeeperMain

public class ZooKeeperMain
extends Object

The command line client to ZooKeeper.


Constructor Summary
ZooKeeperMain()
           
 
Method Summary
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.
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZooKeeperMain

public ZooKeeperMain()
Method Detail

main

public static void main(String[] args)
                 throws NumberFormatException,
                        KeeperException,
                        IOException,
                        InterruptedException
Throws:
NumberFormatException
KeeperException
IOException
InterruptedException

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 client
path - the path to delete quota for
bytes - true if number of bytes needs to be unset
numNodes - 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 client
path - the path for which quota needs to be created
bytes - the limit of bytes on this path
numNodes - the limit of number of nodes on this path
Returns:
true if its successful and false if not.
Throws:
KeeperException
IOException
InterruptedException


Copyright © 2009 The Apache Software Foundation